httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject [PATCH] fix scoreboard state for worker threads
Date Tue, 18 Sep 2001 22:14:58 GMT
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 reak 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.

There is still a bug with how the worker MPM is dealing with MaxClients
that I have yet to fix, but this gets us closer, and fixes one thing at
a time.

-aaron


Index: server/mpm/worker/worker.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/mpm/worker/worker.c,v
retrieving revision 1.22
diff -u -r1.22 worker.c
--- server/mpm/worker/worker.c	2001/09/18 21:14:18	1.22
+++ server/mpm/worker/worker.c	2001/09/18 21:49:02
@@ -695,7 +695,13 @@
 
     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

Mime
View raw message