Zombie processes due exec

Alan DeKok aland at deployingradius.com
Mon Jan 21 02:37:21 CET 2019


On Jan 20, 2019, at 4:59 PM, Hans-Christian Esperer <hc at hcesperer.org> wrote:
> I'm running freeradius 3.17. I'm using the exec module, which calls a python
> script. A zombie process is always left after the script terminates. That
> zombie process "lives" until the script is run again, no matter how long the
> interval is between two script runs. So no big deal, only one zombie process.
> But still it shouldn't be that way, so I thought I'd report it. Perhaps I'm
> missing something?

  The server cleans up old processes periodically, but that's based on being driven by new packets, or other timers.  So if no new requests come in, it doesn't bother cleaning up zombie processes.

  For a host of reasons, the server doesn't catch SIGCHLD.  The short one is that it's multi-threaded.  And Posix (in their infinite wisdom) decreed that SIGCHLD does *not* get delivered to the thread that forked the child process.  Instead, SIGCHLD gets delivered to a *random* thread.

  The coordination to get the signal to the right place is more work than just waiting a little bit.  So this behaviour is intended, but imperfect. The fix would be some significant architectural rework.

  Alan DeKok.




More information about the Freeradius-Users mailing list