You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/03/04 19:18:31 UTC

DO NOT REPLY [Bug 38793] - Segfault when backend failes, threading issue

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-04 19:18 -------
I did some more debugging and found a strange behaviour in ap_proxy_connect_backend

#0  ap_proxy_connect_backend (proxy_function=0x80d5ff9 "HTTP", conn=0x9d0cfd8,
worker=0x9c95db0, s=0x9d154c8) at proxy_util.c:2045
        rv = 164679640
        connected = 1
        loglevel = 164190680
        backend_addr = (apr_sockaddr_t *) 0x9d60a00
        newsock = (apr_socket_t *) 0x9d8fa28
#1  0x0809c748 in proxy_http_handler (r=0x9d99af8, worker=0x9c95db0,
conf=0x9c959d8, url=0x9d91268 "/test/output.php?delay=0", proxyname=0x0,
proxyport=0)
    at mod_proxy_http.c:1691

I put a breakpoint on the return statement in case that conn->sock is null,
however the function will return true, because its internal newsock is valid and
its connected counter is 1. (see stacktrace above). conn looks magically empty:

(gdb) inspect conn->hostname
$4 = 0x0
(gdb) inspect conn->port
$5 = 0
(gdb) inspect conn->pool
$6 = (apr_pool_t *) 0x9d60768
(gdb) inspect conn->is_ssl
$7 = 0
(gdb) inspect conn->sock
$8 = (apr_socket_t *) 0x0
(gdb) inspect conn->addr
$9 = (apr_sockaddr_t *) 0x0
(gdb) inspect conn->flags
$10 = 0
(gdb) inspect conn->close
$11 = 0
(gdb) inspect conn->close_on_recycle
$12 = 0
(gdb) inspect conn->worker
$13 = (proxy_worker *) 0x9c95db0

connected is only set right after conn->sock = newsock , both vars are never
touched until return then. How does conn become so empty ? I also do not have
any of the error messages from ap_proxy_connect_backend in the error_log, so I
assume the bad boy might be another thread.

I get the following error messages from other threads and they are already int
the logfile when the above breakpoint is hit, so chances are that things get
messed up here.

[Sat Mar 04 18:12:48 2006] [error] [client 127.0.0.1] proxy: error reading
status line from remote server (null)
[Sat Mar 04 18:12:48 2006] [error] [client 127.0.0.1] proxy: Error reading from
remote server returned by /test/output.php

above this errormessage is 
ap_proxy_http_cleanup(NULL, r, backend);
which i think is redundant as proxy_http_handler runs cleanup: anyway. removing
did not fix the problem. 

Let me know if this looks like something to go into deeper.
(PS. We are running mod_worker)


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