httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <brian.p...@cnet.com>
Subject [PATCH 2] worker MPM deadlock
Date Wed, 22 May 2002 00:08:31 GMT
Here is an updated worker patch.  It fixes a race condition
that the first patch didn't: it was possible for the listener
thread to push multiple connections onto the fd queue between
the cond_signal and the subsequent wakeup of the next worker.
This caused problems because the idle worker count, which the
listener used to decide when to accept more connections, didn't
get decremented until the worker woke up.  Thus the listener
could overflow the connection queue.

The fix, as implemented in this new patch, is to make the listener
block if either: 1) there are no idle workers, or 2) the queue is
full.

This patch isn't a complete fix, as there is now an error case
in which the listener thread fails to exit during shutdown.  It
needs some more testing and cleanup work.

Meanwhile, I'm going to take another look at leader/follower,
because IMHO the worker synchronization logic is getting far too
complicated.

--Brian


Mime
View raw message