https://bugzilla.suse.com/show_bug.cgi?id=1205636
Bug ID: 1205636 Summary: zypper ps -s shows wrong command and no service Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Major Priority: P5 - None Component: Basesystem Assignee: screening-team-bugs@suse.de Reporter: kukuk@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: ---
After zypper dup and restarting all services reported by zypper ps -s on openSUSE Tumbleweed, USB-hotplug did not work anymore. Reason is that zypper shows wrong commands and thus not the service, which needs a restart:
# zypper ps -s The following running processes use deleted files:
PID | PPID | UID | User | Command | Service ------+------+------------+------------+-------------+-------- 1 | 0 | 0 | root | systemd | 2682 | 2680 | 1366800143 | kukuk | systemd | 24860 | 1 | 0 | root | udevadm |
But PID 24860 is: root 24860 0.0 0.1 29840 1436 ? Ss Nov21 0:00 /usr/lib/systemd/systemd-udevd
Since zypper detects the wrong command and thus does not show, that systemd-udevd.service needs to be restarted, running udevd and installed udev rules don't match and in this case e.g. USB-hotplug does not work anymore, since no more kernel modules get loaded.
https://bugzilla.suse.com/show_bug.cgi?id=1205636
Thorsten Kukuk kukuk@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|screening-team-bugs@suse.de |ma@suse.com
https://bugzilla.suse.com/show_bug.cgi?id=1205636 https://bugzilla.suse.com/show_bug.cgi?id=1205636#c1
Michael Andres ma@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kukuk@suse.com Flags| |needinfo?(kukuk@suse.com)
--- Comment #1 from Michael Andres ma@suse.com --- Could you please run `zypper ps -d zypper.ps.log` if this happens again and attach the the created logfile (zypper.ps.log).
It may be lsof fools us about the command name.
https://bugzilla.suse.com/show_bug.cgi?id=1205636 https://bugzilla.suse.com/show_bug.cgi?id=1205636#c2
Thorsten Kukuk kukuk@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(kukuk@suse.com) |
--- Comment #2 from Thorsten Kukuk kukuk@suse.com --- Created attachment 863142 --> https://bugzilla.suse.com/attachment.cgi?id=863142&action=edit zypper.ps.log
Output of "zypper ps -d zypper.ps.log"
I didn't restart the service yet, so it's possible to get more debug data.
https://bugzilla.suse.com/show_bug.cgi?id=1205636
Andreas Vetter vetter@physik.uni-wuerzburg.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |vetter@physik.uni-wuerzburg | |.de
https://bugzilla.suse.com/show_bug.cgi?id=1205636
Michael Andres ma@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|Basesystem |libzypp
https://bugzilla.suse.com/show_bug.cgi?id=1205636 https://bugzilla.suse.com/show_bug.cgi?id=1205636#c3
--- Comment #3 from Thorsten Kukuk kukuk@suse.com --- The problem happens, if the running daemon is a symlink to another command. E.g.: dir /usr/lib/systemd/systemd-udevd lrwxrwxrwx 1 root root 17 Nov 29 11:19 /usr/lib/systemd/systemd-udevd -> ../../bin/udevadm
which is fine to find out libraries are still used, but is wrong when displaying the name of the daemon and finding out which service it got started by.
https://bugzilla.suse.com/show_bug.cgi?id=1205636 https://bugzilla.suse.com/show_bug.cgi?id=1205636#c4
Michael Andres ma@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|ma@suse.com |zypp-maintainers@suse.de
--- Comment #4 from Michael Andres ma@suse.com --- Thanks. Then we won't trust lsof and always look into /proc
https://bugzilla.suse.com/show_bug.cgi?id=1205636
Michael Andres ma@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |IN_PROGRESS
https://bugzilla.suse.com/show_bug.cgi?id=1205636 https://bugzilla.suse.com/show_bug.cgi?id=1205636#c5
--- Comment #5 from Andreas Vetter vetter@physik.uni-wuerzburg.de --- Do you plan to bring this change to SLE 15, too?
https://bugzilla.suse.com/show_bug.cgi?id=1205636 https://bugzilla.suse.com/show_bug.cgi?id=1205636#c6
--- Comment #6 from Michael Andres ma@suse.com --- @Andreas: The latest updatestack (libzypp-17.x,zypper 1.14.x) feeds TW as well as the whole SLE-15 familiy. TW might be updated a bit more frequently, but we'll submitt all the versions to SLE-15 maintenence as well.
https://bugzilla.suse.com/show_bug.cgi?id=1205636 https://bugzilla.suse.com/show_bug.cgi?id=1205636#c7
--- Comment #7 from Andreas Vetter vetter@physik.uni-wuerzburg.de --- @Michael: Thank you. Much appreciated.
https://bugzilla.suse.com/show_bug.cgi?id=1205636 https://bugzilla.suse.com/show_bug.cgi?id=1205636#c8
--- Comment #8 from Michael Andres ma@suse.com --- Not that easy to fix. The symlink in fact should bot matter.
The associated service is detected by looking into
cat /proc/PID/cgroup
To detect a service we're looking for a line matching
"(0::|[0-9]+:name=systemd:)/system.slice/(.*/)?(.*).service$"
So the question is how /proc/PID/cgroup looks like for the udevadm command?
https://bugzilla.suse.com/show_bug.cgi?id=1205636 https://bugzilla.suse.com/show_bug.cgi?id=1205636#c9
Michael Andres ma@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?
--- Comment #9 from Michael Andres ma@suse.com --- On my TW $ cat /proc/592/cgroup 0::/system.slice/systemd-udevd.service
On 15.x e.g # cat /proc/493/cgroup 12:devices:/system.slice/systemd-udevd.service 11:perf_event:/ 10:hugetlb:/ 9:rdma:/ 8:blkio:/system.slice/systemd-udevd.service 7:freezer:/ 6:cpuset:/ 5:pids:/system.slice/systemd-udevd.service 4:net_cls,net_prio:/ 3:cpu,cpuacct:/system.slice/systemd-udevd.service 2:memory:/system.slice/systemd-udevd.service 1:name=systemd:/system.slice/systemd-udevd.service 0::/system.slice/systemd-udevd.service
On both the service would be detected as 'systemd-udevd'.
If someone can still reproduce it, please attach the output of the content of /proc/PID/cgroup for the command thet should have a service associated.
https://bugzilla.suse.com/show_bug.cgi?id=1205636 https://bugzilla.suse.com/show_bug.cgi?id=1205636#c10
--- Comment #10 from Thorsten Kukuk kukuk@suse.com --- (In reply to Michael Andres from comment #9)
On my TW $ cat /proc/592/cgroup 0::/system.slice/systemd-udevd.service
On all of my Tumbleweed and MicroOS systems:
man (manpages.o.o):~ # cat /proc/465/cgroup 0::/system.slice/systemd-udevd.service/udev
There is always an additional "/udev" at the end, which of course does not match your regex.
I don't see this on any SLE15 SP3/SLE15 SP4 systems. So seems to be a change in Factory.
https://bugzilla.suse.com/show_bug.cgi?id=1205636 https://bugzilla.suse.com/show_bug.cgi?id=1205636#c11
Michael Andres ma@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |FIXED Flags|needinfo? |
--- Comment #11 from Michael Andres ma@suse.com --- Fixed for libzypp-17.31.8