reassign 652026 dpkg
retitle 652026 start-stop-daemon: --name behaviour changes with kernel 3.1+
affects 652026 amavisd-new
summary 652026 0
severity 652026 important
thanks

On Thu, 15 Dec 2011, Michael Reincke wrote:
> > Ok, so what broke perl/start-stop-daemon, now?   --name uses
> > /proc/<pid>/stat to locate the process...
> >
> > Might be the kernel, it seems to be failing on 3.1.
> >
> > Please give us the output of cat /proc/<pid of an amavis process>/stat,
> > preferably for the master process (the one listed in the pid file).
> >
> the output as requested:
> 
>     <503 pcew80@reincke:~> ps -aef | grep amavis
>     amavis    2299     1  0 00:47 ?        00:00:01 amavisd (master)
>     amavis    2496  2299  0 00:47 ?        00:00:00 amavisd (ch7-avail)
>     amavis    2497  2299  0 00:47 ?        00:00:00 amavisd (ch7-avail)
>     amavis    2498  2299  0 00:47 ?        00:00:00 amavisd (ch6-avail)
>     reincke   7749  7078  0 08:32 pts/1    00:00:00 grep amavis
> 
>     <504 pcew80@reincke:~> cat /proc/2299/stat
>     2299 (amavisd (master) S 1 2299 2299 0 -1 4202560 9771 0 4 0 119 5 0
>     0 20 0 1 0 22660083 221208576 22204 18446744073709551615 1 1 0 0 0 0
>     0 4224 81927 18446744073709551615 0 0 17 2 0 0 7 0 0

Crap.  The kernel has done us in.  Reassigning to dpkg to get some input on
what should be done.  Raising severity because it will cause some services
to not be stopped or restarted properly, which has security implications.

Guys, 3.1 changes /proc/<pid>/stat, and breaks anything using
start-stop-daemon --name that also messes with the name of the process.  Due
to the chage in /proc/<pid>/stat, the executable name is not matched
anymore.

This probably affects only processes that change their "visible identity"
(or whatever the string output by ps -aef is called) like amavisd-new does.

Unfortunately, using --exec is not enough when you're dealing with perl,
python or other scripts.

How should we proceed?  Drop use of start-stop-daemon --name in amavisd-new
and document this kernel ABI issue in start-stop-daemon(8)?  Reassign to the
kernel on the grounds that it broke the userspace ABI?  Enhance
start-stop-daemon to take a --namere (regexp) and use that in amavisd-new
instead?

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to