Commit 1b15d486 authored by Justin Erenkrantz's avatar Justin Erenkrantz
Browse files

This patch fixes a nasty bug in the worker MPM where the

state of the worker threads was not being reported back to the
scoreboard, and eventually all the threads running in the children
would be reported as being in the "C -- closing connection" state.
This would wreak havoc on the idle_server_maintenance() routine. Since
these threads would never be counted as idle, the server would
spawn children as fast as possible.

Submitted by:	Aaron Bannert <aaron@clove.org>
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91079 13f79535-47bb-0310-9956-ffa450edef68
parent 7658b0e1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
Changes with Apache 2.0.26-dev

  *) Fix worker MPM's scoreboard logic.  [Aaron Bannert <aaron@clove.org>]

  *) Eliminate the wasteful run-time conversion of method names from strings 
     to numbers in places where the methods are known at compile time.  
     [Brian Pane <bpane@pacbell.net>]
+4 −0
Original line number Diff line number Diff line
@@ -697,7 +697,11 @@ static void *worker_thread(apr_thread_t *thd, void * dummy)

    free(ti);

    (void) ap_update_child_status(process_slot, thread_slot,
                                  SERVER_STARTING, (request_rec *)NULL);
    while (!workers_may_exit) {
        (void) ap_update_child_status(process_slot, thread_slot,
                                      SERVER_READY, (request_rec *)NULL);
        rv = ap_queue_pop(worker_queue, &csd, &ptrans);
        /* We get FD_QUEUE_EINTR whenever ap_queue_pop() has been interrupted
         * from an explicit call to ap_queue_interrupt_all(). This allows