guix-devel
[Top][All Lists]
Advanced

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

Re: Shepherd does not recycle zombie processes


From: Carlo Zancanaro
Subject: Re: Shepherd does not recycle zombie processes
Date: Fri, 11 Nov 2016 00:15:23 +1100
User-agent: mu4e 0.9.16; emacs 25.1.1


On Wed, Nov 09 2016, Ludovic Courtès wrote
Could you run shepherd in “strace -f” and see where the SIGCHLD signals go?

I don't really know how to read strace's output (and there's a lot of it), but sometimes it gives a line like this:

--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=10496, si_status=SIGTERM, si_utime=142, si_stime=22} ---

and sometimes it gives a line like this:

[pid 10465] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=10556, si_status=SIGTERM, si_utime=84, si_stime=16} ---

If it has the [pid xxxxx] prefix then the signal is handled properly and the child process is reaped. If there's no prefix then a zombie process is left behind. (The pid in the prefix is the pid of the forked daemon process.)

Using my example init.scm file I have found that if I run `herd restart sleep` repeatedly and quickly (< 1 second) then it will consistently reap the processes. If I delay for more than about a second between runs then it will fail to reap the old process. (With strace attached this time is extended to a few seconds.)

Carlo

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]