Bug#888743: marked as done (pidofproc returns PIDs in foreign chroots and containers)

Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Bug#888743: marked as done (pidofproc returns PIDs in foreign chroots and containers)

Debian Bug Tracking System
Your message dated Thu, 16 May 2019 13:03:27 +0000
with message-id <[hidden email]>
and subject line Bug#888743: fixed in lsb 10.2019051400
has caused the Debian Bug report #888743,
regarding pidofproc returns PIDs in foreign chroots and containers
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [hidden email]
immediately.)


--
888743: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888743
Debian Bug Tracking System
Contact [hidden email] with problems

Package: lsb-base
Version: 9.20161125

Apparently pidofproc returns the PIDs of programs running
in a chroot or in a container, if there is no local PID file.
This is a *huge* problem for me, because either the init
scripts on the host fail to restart services, or they affect
services running in a container/chroot.

Sample session:

root@mydb01a:~# . /lib/lsb/init-functions
root@mydb01a:~# pidofproc /usr/sbin/smtpd
26623
root@mydb01a:~# ps -ef | grep smtp[d]
root      1689  1541  0 Jan17 ?        00:00:00 /usr/sbin/smtpd
uml-net   1690  1689  0 Jan17 ?        00:00:00 smtpd: klondike
uml-net   1691  1689  0 Jan17 ?        00:00:00 smtpd: control
uml-net   1692  1689  0 Jan17 ?        00:00:00 smtpd: lookup
uml-net   1693  1689  0 Jan17 ?        00:00:00 smtpd: pony express
lxc-dns+  1694  1689  0 Jan17 ?        00:00:00 smtpd: queue
uml-net   1695  1689  0 Jan17 ?        00:00:00 smtpd: scheduler
root      4193  4032  0 Jan10 ?        00:00:00 /usr/sbin/smtpd
lxc-dns+  4194  4193  0 Jan10 ?        00:00:00 smtpd: klondike
lxc-dns+  4195  4193  0 Jan10 ?        00:00:00 smtpd: control
lxc-dns+  4196  4193  0 Jan10 ?        00:00:00 smtpd: lookup
lxc-dns+  4197  4193  0 Jan10 ?        00:00:00 smtpd: pony express
zabbix    4198  4193  0 Jan10 ?        00:00:00 smtpd: queue
lxc-dns+  4199  4193  0 Jan10 ?        00:00:00 smtpd: scheduler
root     26623     1  0 14:06 ?        00:00:00 /usr/sbin/smtpd
opensmt+ 26625 26623  0 14:06 ?        00:00:00 smtpd: klondike
opensmt+ 26626 26623  0 14:06 ?        00:00:00 smtpd: control
opensmt+ 26627 26623  0 14:06 ?        00:00:00 smtpd: lookup
opensmt+ 26628 26623  0 14:06 ?        00:00:00 smtpd: pony express
opensmt+ 26629 26623  0 14:06 ?        00:00:00 smtpd: queue
opensmt+ 26630 26623  0 14:06 ?        00:00:00 smtpd: scheduler


Please note the smtpds running in 2 LXC containers. If I kill
the local smtpd, then pidofproc finds the foreign smtpds:

root@mydb01a:~# kill 26623
root@mydb01a:~# pidofproc /usr/sbin/smtpd
4199 4198 4197 4196 4195 4194 4193 1695 1694 1693 1692 1691 1690 1689
root@mydb01a:~# echo $?
0


If pidofproc would use "pidof -c" internally, then it should work as
expected:

root@mydb01a:~# /bin/pidof -o %PPID -x /usr/sbin/smtpd
4199 4198 4197 4196 4195 4194 4193 1695 1694 1693 1692 1691 1690 1689
root@mydb01a:~# /bin/pidof -c -o %PPID -x /usr/sbin/smtpd
root@mydb01a:~# echo $?
1


lsb-base version 9.20170808 has the same problem. I would highly
appreciate a fix for stretch and sid.


Regards
Harri

Source: lsb
Source-Version: 10.2019051400

We believe that the bug you reported is fixed in the latest version of
lsb, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [hidden email],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Didier Raboud <[hidden email]> (supplier of updated lsb package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [hidden email])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 14 May 2019 08:50:39 +0200
Source: lsb
Architecture: source
Version: 10.2019051400
Distribution: unstable
Urgency: medium
Maintainer: Debian LSB Team <[hidden email]>
Changed-By: Didier Raboud <[hidden email]>
Closes: 888743
Changes:
 lsb (10.2019051400) unstable; urgency=medium
 .
   [ Harald Dunkel ]
   * pidofproc: use "pidof -c" to avoid pidofproc results from containers or chroots
     (Closes: #888743)
Checksums-Sha1:
 d81f73160e3eb65af99bd71380571ca1c3e0b27d 1695 lsb_10.2019051400.dsc
 7b65840e9d83f277b447db7c630a282c039c88cb 42204 lsb_10.2019051400.tar.xz
Checksums-Sha256:
 79be4b76a50edb2e2f0fb0f2301d74aa36be7e4ed1aedc2cb92e0ca93a97e194 1695 lsb_10.2019051400.dsc
 e134c5780b70e3aac9d175e70bee4eb187e01bc02bb0d4e8a9b19dc52aabd557 42204 lsb_10.2019051400.tar.xz
Files:
 a54e8b63ada0978866857985e1fe027c 1695 misc extra lsb_10.2019051400.dsc
 721c419ec077890133a4df6949eebba4 42204 misc extra lsb_10.2019051400.tar.xz

-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEEe+WPIRpjNw1/GSB7i8+nHsoWNFUFAlzdW6EACgkQi8+nHsoW
NFVShwv+OdSSeXDjofK6NSK27LzMHlbjHivnNL9+GkA9voxFevKdJIfi8LIvRNgx
/RoEEIwfw8o3OdPf9FARt9kpRbjSIkIh6yl/YkMq6CzwQwtAgdrSG7IiCnrS8ewM
E6bx06bOY4QQ0/CWOm76yPM/mb6FlREcLBfW5yo57icnyZJxOEU9Bm/rI9/fkDJv
KVlTQ1Sx2FYE1HnWychMfi91MmXMFbAX74osetork/pmPILh7OaG2yHGSH2jjvdd
fUMnE8Lh+HlTtyP+wiHZRg4rhPrd4ob1tTsio3nN2x0SQGYrlIaJKFeKlaNdolu7
d965PpjL4+nhrg9NJls5qRwgHp1frAV4dlq6g+aZz6u8Jgro7RuxoXZBml4oSU1J
bSr+gCkmzNWNV23MsKmEif2NgtlqkpkwMwpdYGGZ8mYUMkyGsGWRB1YB/MpDRj7J
1UrJd47qg93Rln/COYydlf8lqGlgszTelgreFbz8kRm9YOi/YpW0Tf6jaBaSGre3
gTBBsZFG
=ELPL
-----END PGP SIGNATURE-----