1 Feb 2008 10:41
Re: PR42829: graceful restart with multiple listeners using prefork MPM can result in hung processes
Stefan Fritsch <sf <at> sfritsch.de>
2008-02-01 09:41:39 GMT
2008-02-01 09:41:39 GMT
Joe Orton wrote: > I mentioned in the bug that the signal handler could cause undefined > behaviour, but I'm not sure now whether that is true. On Linux I can > reproduce some cases where this will happen, which are all due to > well-defined behaviour: > > 1) with some (default on Linux) accept mutex types, > apr_proc_mutex_lock() will loop on EINTR. Hence, children blocked > waiting for the mutex do "hang" until the mutex is released. Fixing > this would need some APR work, new interfaces, blah This is not a problem. On graceful-stop or reload the processes will get the lock one by one and die (or hang somewhere else). I have never seen a left over process hanging in this function. > 2) prefork's apr_pollset_poll() loop-on-EINTR loop was not checking > die_now; the child holding the mutex will not die immediately if poll > fails with EINTR, and will hence appear to "hang" until a new connection > is recevied. Fixed by http://svn.apache.org/viewvc?rev=613260&view=rev IMHO this is the same as 3), as apr_pollset_poll() will be called again but with all fds already closed. > I can also reproduce a third case, but I'm not sure about the cause: > > 3) apr_pollset_poll() is blocking despite the fact that the listening > fds are supposedly already closed before entering the syscall. This is the main problem in my experience.(Continue reading)
.
Regards
Rüdiger
RSS Feed