httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38403] - Child-Thread uses 100%CPU usage, mod_proxy ?
Date Mon, 06 Feb 2006 18:19:25 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38403>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38403





------- Additional Comments From mk-asf@gigacodes.de  2006-02-06 19:19 -------
We probably found the root of evil:

a graceful restart does destroy but not reinitialize the resource list that
keeps the pooled connections. this is due to a early return in
ap_proxy_initialize_worker (proxy_util.c) when called again. Our patch is not
nice, but worked for us. (restart instead of graceful did it also as workaround)


--- proxy_util.c        2006-02-06 13:59:35.000000000 +0000
+++ proxy_util.c.orig   2006-02-06 17:48:39.000000000 +0000
@@ -1629,7 +1630,7 @@
     int mpm_threads;
 #endif

-    if (worker->s->status & PROXY_WORKER_INITIALIZED && worker->cp->res)
{
+    if (worker->s->status & PROXY_WORKER_INITIALIZED) {
         /* The worker is already initialized */
         return APR_SUCCESS;
     }


We noticed this when we tried to force the 99% cpu threads by stressing the
webserver with ab ( -k -c 20 ). after a graceful restart the server was likely
to coredump at 

proxy_util.c:1758 (*conn)->worker = worker;

because conn was null. it seems that conn is deleted be another thread.
conditional breakpoints above proxy_util.c:1745 (rv = APR_SUCCESS;) never
spotted a conn = 0.

before the graceful we run through this condition (no problems) but after
gracefull res is null.

    if (worker->hmax && worker->cp->res) {
        rv = apr_reslist_acquire(worker->cp->res, (void **)conn);
    }

this change in flow introduces the concurrency problems. is the else branch
without the pool threadsafe or only intended for prefork ? 

Some facts that would speek for the graceful theory:
a) 99% threads only appeared on servers in the farm that used graceful and not
restart
b) they only appeared after a graceful, never directly after startup
c) after a graceful, there was no limit on the number of backend connections


on the setup: We use Dual Xeons with Hyperthreading (so there might be higher
concurrency) and we compiled with --enable-nonportable-atomics

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message