]> granicus.if.org Git - apache/commitdiff
This patch fixes a nasty bug in the worker MPM where the
authorJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 19 Sep 2001 05:58:09 +0000 (05:58 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 19 Sep 2001 05:58:09 +0000 (05:58 +0000)
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

CHANGES
server/mpm/worker/worker.c

diff --git a/CHANGES b/CHANGES
index bd85b53c9a8f9c249376796875ea23197457fdd4..621f0f9f47cac2a69c5ea9f74af1d17a8852d562 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
 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>]
index 1647b9d42729fafb136b94ebdfaf41a15f45c88a..67745f7425b12dbd86b63ccc08f782700fbc8950 100644 (file)
@@ -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