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 38793] - Segfault when backend failes, threading issue
Date Mon, 06 Mar 2006 20:16:39 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=38793>.
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=38793





------- Additional Comments From mk-asf@gigacodes.de  2006-03-06 20:16 -------
switch loglevel to debug eliminates problem ( probably because of a change in
timing because of the additional overhead).

I changed the patch to log as ERROR. I grepped the logfile for the segfaulting
backend and all non "backend" messages:

[Mon Mar 06 19:37:35 2006] [error] proxy: HTTP: Aquired backend 0x987bff8 for
request 0xa9e20540, connection 0xaa01ab08, pid 13549, tid 0xb4184bb0
[Mon Mar 06 19:37:35 2006] [error] proxy: HTTP: Released backend 0x987bff8 for
request 0xa9e20540, connection 0xaa01ab08, pid 13549, tid 0xb4184bb0
[Mon Mar 06 19:37:35 2006] [error] [client 127.0.0.1] proxy: error reading
status line from remote server (null)
[Mon Mar 06 19:37:35 2006] [error] [client 127.0.0.1] proxy: Error reading from
remote server returned by /test/output.php
[Mon Mar 06 19:37:35 2006] [error] proxy: HTTP: Released backend 0x987bff8 for
request 0xa9e20540, connection 0xaa01ab08, pid 13549, tid 0xb4184bb0
[Mon Mar 06 19:37:35 2006] [error] [client 127.0.0.1] proxy: error reading
status line from remote server (null)
[Mon Mar 06 19:37:35 2006] [error] [client 127.0.0.1] proxy: Error reading from
remote server returned by /test/output.php
[Mon Mar 06 19:37:35 2006] [error] [client 127.0.0.1] proxy: error reading
status line from remote server (null)
[Mon Mar 06 19:37:35 2006] [error] [client 127.0.0.1] proxy: Error reading from
remote server returned by /test/output.php
[Mon Mar 06 19:37:35 2006] [error] [client 127.0.0.1] proxy: error reading
status line from remote server (null)
[Mon Mar 06 19:37:35 2006] [error] [client 127.0.0.1] proxy: Error reading from
remote server returned by /test/output.php
[Mon Mar 06 19:37:35 2006] [error] [client 127.0.0.1] proxy: error reading
status line from remote server (null)
[Mon Mar 06 19:37:35 2006] [error] [client 127.0.0.1] proxy: Error reading from
remote server returned by /test/output.php
[Mon Mar 06 19:37:35 2006] [error] proxy: HTTP: Aquired backend 0x987bff8 for
request 0xaa034be8, connection 0xaa030d90, pid 13549, tid 0xadd7abb0
[Mon Mar 06 19:37:35 2006] [error] proxy: HTTP: Aquired backend 0x987bff8 for
request 0xa9e2a568, connection 0xaa018a90, pid 13549, tid 0xaf17cbb0
[Mon Mar 06 19:37:35 2006] [error] proxy: HTTP: Released backend 0x987bff8 for
request 0xa9e2a568, connection 0xaa018a90, pid 13549, tid 0xaf17cbb0
[Mon Mar 06 19:37:35 2006] [error] [client 127.0.0.1] proxy: error reading
status line from remote server (null)
[Mon Mar 06 19:37:35 2006] [error] [client 127.0.0.1] proxy: Error reading from
remote server returned by /test/output.php
[Mon Mar 06 19:37:35 2006] [error] proxy: HTTP: Released backend 0x987bff8 for
request 0xa9e2a568, connection 0xaa018a90, pid 13549, tid 0xaf17cbb0

The backend gets released, "error reading status line" gets logged, and the same
backend gets released again. Afterwards it gets acquired by 2 different threads. 
One thread fails with same error (0xaf17cbb0) releasing the backend, the other
thread gets the segfault (0xadd7abb0) while in ap_proxy_connection_create. (gdb bt).

I suspect   ap_proxy_http_cleanup(NULL, r, backend)   in line 1220 ( and 1246,
numbers my vary because of your patch ) of mod_proxy_http.c to be the problem,
as mentioned in previous comment, it gets called there and again in line 1741,
after the cleanup:-goto.  I don't know what the proxy_function argument means in
line 1741, because the other cleanups are called with NULL ?



Removing line 1220 eliminates the Segfaults. But I get these lines after some
time running ab:

(99)Cannot assign requested address: proxy: HTTP: attempt to connect to
127.0.0.1:8081 (127.0.0.1) failed

I guess this could be related to a temporary shortage of tcp-ip source ports
(I'm running ab from the same machine and it never happens for the first 20000
requests)

-- 
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