Bug#926896: sysvinit-utils: pidof is unreliable
Witold Baryluk
witold.baryluk at gmail.com
Thu Apr 11 21:55:20 BST 2019
Package: sysvinit-utils
Version: 2.93-8
Severity: important
root at debian:~# echo; whoami; echo; ps aux | grep 'dd if'; echo; hd /proc/41344/cmdline ; echo; ls -l /proc/41344/exe; echo; pidof dd || echo "Not found"; echo; ls -l /proc/41344/exe
root
root 41344 2.0 0.0 217704 1960 pts/3 D+ 20:40 0:09 dd if=/dev/sdc of=/dev/null bs=64k
root 42045 0.0 0.0 218480 828 pts/9 S+ 20:48 0:00 grep dd if
00000000 64 64 00 69 66 3d 2f 64 65 76 2f 73 64 63 00 6f |dd.if=/dev/sdc.o|
00000010 66 3d 2f 64 65 76 2f 6e 75 6c 6c 00 62 73 3d 36 |f=/dev/null.bs=6|
00000020 34 6b 00 |4k.|
00000023
lrwxrwxrwx 1 root root 0 Apr 11 20:44 /proc/41344/exe -> /usr/bin/dd
Not found
lrwxrwxrwx 1 root root 0 Apr 11 20:44 /proc/41344/exe -> /usr/bin/dd
root at debian:~#
For some reason pidof can't find 'dd'. pidof dd prints nothing and
returns false (exit code 1).
Both dd and pidof are running as root.
killall -USR1 dd , delivers a signal to correct process, so killall (from
psmisc package) does find it.
Thanks.
-- System Information:
Debian Release: buster/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.19.0-2-amd64 (SMP w/32 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages sysvinit-utils depends on:
ii init-system-helpers 1.56+nmu1
ii libc6 2.28-8
ii util-linux 2.33.1-0.1
sysvinit-utils recommends no packages.
sysvinit-utils suggests no packages.
-- no debconf information
More information about the Debian-init-diversity
mailing list