Bug 1219464

Summary: zypper ps lists files in containers that have been "changed"
Product: [openSUSE] openSUSE Distribution Reporter: Miukuna <jjlahtinen>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: jjlahtinen
Version: Leap 15.5   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Leap 15.5   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Broken zypper ps output from openSUSE 15.5
Working zypper ps output from openSUSE 15.5
zypper PD Debug from zypper ps broken state.

Description Miukuna 2024-02-02 06:13:46 UTC
After recent update to libzypp-17.31.22-150400.3.43.1, zypper ps functionality has changed to list what it assumes are changed files in docker containers (24.0.7_ce from 15.5 repo

For example;
derp:~ # zypper ps

The following running processes use deleted files:
2376 | 2215 | 0    | root  | node    |         | /usr/lib/x86_64-linux-gnu/libdl.so.2 (stat: No such file or directory)
     |      |      |       |         |         | /usr/lib/x86_64-linux-gnu/libm.so.6 (stat: No such file or directory)
     |      |      |       |         |         | /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 (stat: No such file or directory)
     |      |      |       |         |         | /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 (stat: No such file or directory)
     |      |      |       |         |         | /usr/lib/x86_64-linux-gnu/libpthread.so.0 (stat: No such file or directory)
     |      |      |       |         |         | /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30 (stat: No such file or directory)
     |      |      |       |         |         | /usr/lib/x86_64-linux-gnu/libc.so.6 (stat: No such file or directory)
     |      |      |       |         |         | /usr/local/bin/node (stat: No such file or directory)

or in short form:

derp:~ # zypper ps -s
The following running processes use deleted files:

PID  | PPID | UID  | User  | Command | Service
-----+------+------+-------+---------+--------
2376 | 2215 | 0    | root  | node    | 
2395 | 2212 | 0    | root  | node    | 
2490 | 2322 | 1000 | sofia | node    | 
2600 | 2486 | 0    | root  | node    | 
2682 | 2489 | 0    | root  | dash    | 
2875 | 2682 | 0    | root  | java    | 
3108 | 2600 | 0    | root  | node    | 
3137 | 2395 | 0    | root  | node    | 
3228 | 2741 | 0    | root  | dash    | 
3255 | 2376 | 0    | root  | dash    | 
3259 | 3255 | 0    | root  | node    | 
3267 | 3259 | 0    | root  | node    | 
3268 | 3259 | 0    | root  | node    | 
3274 | 3259 | 0    | root  | node    | 

Downgrading to libzypp-17.31.22-150400.3.43.1.x86_64 restores previous expected functionality where it only shows files that been updated in the host system. As I personally use zypper ps to check which systems need rebooting or restarting of services this kinda cripples it.
Comment 1 Michael Andres 2024-02-05 09:26:15 UTC
(In reply to Miukuna from comment #0)
> After recent update to libzypp-17.31.22-150400.3.43.1, zypper ps...
> Downgrading to         libzypp-17.31.22-150400.3.43.1.x86_64 restores...

The versions do not fit together.

There's been a bug introduced in 17.31.27 and fixed in 17.31.29, which could match your description. But before that the code is unchanged since 17.31.8.

In case of doubt, please attach the /var/log/zypper.log showing the suspicious `zypper ps` and a zypper ps debugfile (zypper ps --debugFile /tmp/zypper-pd.debug).
Comment 2 Miukuna 2024-02-05 09:44:46 UTC
Created attachment 872446 [details]
Broken zypper ps output from openSUSE 15.5
Comment 3 Miukuna 2024-02-05 09:45:07 UTC
Created attachment 872447 [details]
Working zypper ps output from openSUSE 15.5
Comment 4 Miukuna 2024-02-05 09:46:20 UTC
Here are the package versions that exhibit the issue:
--
libsolv-tools-0.7.27-150400.3.11.2.x86_64 
libzypp-17.31.27-150400.3.49.1.x86_64
zypper-1.14.68-150400.3.40.2.x86_64 

Here are the relevant zypp packages that, after downgraded to, no longer exhibit the issue:
--
libsolv-tools-0.7.24-150400.3.8.1.x86_64 
libzypp-17.31.22-150400.3.43.1.x86_64
zypper-1.14.66-150400.3.35.1.x86_64 

Attached zypper.logs from broken state as well as non-broken.
Comment 5 Miukuna 2024-02-05 09:49:55 UTC
Created attachment 872448 [details]
zypper PD Debug from zypper ps broken state.
Comment 6 Michael Andres 2024-02-05 10:06:38 UTC
Thanks. The ps bug in ibzypp-17.31.27 is fixed in 17.31.29.
So this is a duplicate of bug#1218782.

*** This bug has been marked as a duplicate of bug 1218782 ***