[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: start-stop-daemon can't stop process



25-08-2007, Bruce Sass:
> Hi,

Hallo, Bruce.

> I have an exim4 daemon (bug #396944) which doesn't stop...
>
> # ps aux|grep exim4
> 102       1685  0.0  0.0   5444   396 ?        Ss   Jul26   0:00 /usr/sbin/exim4 -bd -q30m
> # start-stop-daemon --stop --oknodo --pidfile /var/run/exim4/exim.pid --retry 30 --exec /usr/sbin/exim4
> No /usr/sbin/exim4 found running; none killed.
> # ps aux|grep exim4
> 102       1685  0.0  0.0   5444   396 ?        Ss   Jul26   0:00 /usr/sbin/exim4 -bd -q30m
> # start-stop-daemon --stop --oknodo --retry 30 --exec /usr/sbin/exim4
> No /usr/sbin/exim4 found running; none killed.
> # ps aux|grep exim4
> 102       1685  0.0  0.0   5444   396 ?        Ss   Jul26   0:00 /usr/sbin/exim4 -bd -q30m

Process isn't zombie, that means `start-stop-daemon` didn't tried hard to
kill "exim4". Final stage of such process is `kill -KILL` which must be
fatal, grace shutdown must be provided by start/stop script.

If process is there and/or zombie, it may survive, but this can be daemon
running bug (child waiting to report status for parent) or kernel's one
(can't interrupt system call, like read(nfs) or write(somefs); anything
else).

> ...an strace[1] of s-s-d shows this...
>
> readlink("/proc/1685/exe", "/usr/sbin/.nfs00035c1d000000a3", 256) = 30
> stat64("/usr/sbin/.nfs00035c1d000000a3", {st_mode=S_IFREG|S_ISUID|0755, st_size=672764, ...}) = 0
>
> ...and...
>
> $ grep "/usr" /etc/fstab
> smokie:/mnt/og-usr /usr    nfs       tcp,rsize=8192,wsize=8192    0  2
>
>
> Is this a s-s-d bug?
>
> Process 1685 is still running,
> what is the best way to get the whole story of this process?

To run it under debugger :)

>
>
> - Bruce
>
> [1] Here is the entire strace output:

Or no, if "sh -c 'kill -KILL `ps -C exim4 -o pid | ( read dog && cat )`'"
is killing it, i don't want that.
____



Reply to: