Brian Pane wrote:

> Weren't the thread management problems with the threaded MPM
> related specifically to shutdown?  If it's just shutdown that's
> a problem, it may be possible to solve it.

The basic problem was the global accept mutex.  Once it was time for a
process to die, we didn't have a reliable way to wake up all the threads
in that process who were waiting on the mutex.  We would see this with
graceful restarts and after ap_process_idle_server_maintenance decided
it had too many workers.  If you looked at mod_status, you would see
processes with a few idle threads and often a "G" hanging around
indefinately.  But other than that, graceful restarts worked fine.

This problem didn't exist when we used separate intra-process and
cross-process accept mutexes, because once it's time to die, nobody
acquires the intra-process mutex.  But that requires an extra syscall on
every request.

With your design, we shouldn't have the problem where some threads in a
process are blocked in mutex land unaware that it's time to die, because
only one thread at a time is an accept thread.

Non-graceful restarts in threaded had the same problem worker has today:
no way to blow away threads which are serving long-running requests.

Greg

Reply via email to