[nsd-users] pkill nsd create zombies

Peter van Dijk peter.van.dijk at powerdns.com
Thu Apr 8 13:33:26 UTC 2021


Hello Andreas,

On Mon, 2021-02-15 at 16:56 +0100, A. Schulze via nsd-users wrote:
> root at 497d872b1c91:/# ps afx
>     PID TTY      STAT   TIME COMMAND
>      19 pts/0    Ss     0:00 bash
>      28 pts/0    R+     0:00  \_ ps afx
>       1 ?        Ss     0:00 /bin/sleep infinity

Exited processes always become zombies, until their parent reaps them.
Usually this happens so quickly that you never even notice you had any
zombies!

If the parent process of an unreaped zombie disappears, the zombie is
reparented to PID 1. On 'normal' systems (i.e. not inside Docker
containers), PID 1 is an init process that is ready to reap any zombie
it finds.

/bin/sleep infinity (even if it does contain the string 'init'!) is not
such an init process.

If you pass '--init' to 'docker run', Docker will install a small init
(called tini - tiny init, get it? :-) ) as PID 1 in your container, and
that will reap the zombies for you. If you are not using 'docker run',
consult the documentation for whatever you are using to manage your
containers. I promise it will have a similar flag.

Kind regards,
-- 
Peter van Dijk
PowerDNS.COM BV - https://www.powerdns.com/



More information about the nsd-users mailing list