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=38
793>.
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
a>
Summary: Segfault when backend failes, threading
issue
Product: Apache httpd-2
Version: 2.2.0
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_proxy
AssignedTo: bugs httpd.apache.org
ReportedBy: mk-asf gigacodes.de
We run apache22 as reverse proxy to a backend application
server (apache1.3).
When we put apache22 under load ( ab -k -c 200 ) and restart
the backend server,
there's a good chance of a segmentation fault.
We've done multiple runs and all Segfault backtraces shared
the
proxy_http_handler in mod_proxy_http.c with calls between
the comments "Step
One" and "Step Six". The attached
backtrace is the most common one.
My guess is, that when the first connection fails, it clears
pooled
connections/ressources currently being used by other threads
that are already in
the code between "Step One" and "Step
Six", so their backend->connection gets
nulled in the middle of doing something. In my opinion
backend->connection
should never be 0 in this part of the code, since all failed
functions would
goto cleanup. However backtrace shows them 0 as well as some
cond breakpoints.
(Although sometimes breakpoints get passed, but thread
segfaults anyway).
#0 0x08095f79 in ap_proxy_make_fake_req (c=0x0,
r=0x19520540) at proxy_util.c:351
rp = (request_rec *) 0x94d53f0
#1 0x0809b6ca in ap_proxy_http_process_response
(p=0x94d42f8, r=0x19520540,
backend=0x917c0e0, origin=0x0, conf=0x91069d8,
server_portstr=0xaef82190 "") at
mod_proxy_http.c:1206
c = (conn_rec *) 0x94d44e8
buffer = '\0' <repeats 3420 times>,
"\211\003_\000\211\003_\000H\037\uffff\uffff
uffffG]\000\000\000\000\000\uffff)`\000\023\000\0
00\000\uffff\016\uffff\uffff\000\000\000\000\000\
000\000\000\uffff\036\uffff\uffff\f\000\000\000\0
24\000\000\000\uffff!\003D\uffff\016\uffff\uffff\u
ffff\016\uffff\uffff\uffff\036\uffff\uffff\n\000\0
00\000\003\000\000\001\207F\000\000\023\000\000\
000\uffff\016\uffff\uffff\000\020\000\000\f\000\0
00\000\uffff\036\uffff\uffff\f\000\000\000\uffff\
016\uffff\uffff\001",
'\0' <repeats 19 times>,
"\024\000\000\000\003\000\002\000\uffff!\003
D\207F\000\000\000\000\000\000\001\000\000\000\0
24\000\001",
'\0' <repeats 16 times>,
"\001\024\000\006\000\uffff\uffff\uffff\uffff
\uffff\uffff\uffff\uffffd\r\000\000d\r\000\000 \000\000\000\024\000\002\000\uffff!\003D\20
7"...
buf = 0xa <Address 0xa out of bounds>
keepchar = 100 'd'
rp = (request_rec *) 0x95037d8
e = (apr_bucket *) 0x312e302e
bb = (apr_bucket_brigade *) 0x94d53f0
len = -1
backasswards = 774909495
interim_response = 842082336
pread_len = 0
save_table = (apr_table_t *) 0x72656b72
#2 0x0809c7e2 in proxy_http_handler (r=0x19520540,
worker=0x9106db0,
conf=0x91069d8, url=0x94d4ff0
"/test/output.php?delay=10",
proxyname=0x0, proxyport=0) at mod_proxy_http.c:1712
status = 0
server_portstr =
"\000N\r\b]\005\000\000\a\000\000\000\000\
000\000\000
e\030\t\uffffDM\t \005R\031\000\000\000"
scheme = 0x94d4f90 "http"
proxy_function = 0x80d5ff9 "HTTP"
u = 0x195217fa
"://127.0.0.1:8081/test/output.php?delay=10"
backend = (proxy_conn_rec *) 0x917c0e0
is_ssl = 0
p = (apr_pool_t *) 0x94d42f8
c = (conn_rec *) 0x94d44e8
uri = (apr_uri_t *) 0x94d4f60
#3 0x080951d5 in proxy_run_scheme_handler (r=0x19520540,
worker=0x9106db0,
conf=0x91069d8,
url=0x195217f6 "http:/
/127.0.0.1:8081/test/output.php?delay=10",
proxyhost=0x0, proxyport=0) at mod_proxy.c:1936
pHook = (proxy_LINK_scheme_handler_t *) 0x91dd358
n = 0
rv = 424810486
#4 0x08092a3d in proxy_handler (r=0x19520540) at
mod_proxy.c:739
#5 0x0807cdcd in ap_run_handler (r=0x19520540) at
config.c:157
#6 0x0807d50d in ap_invoke_handler (r=0x19520540) at
config.c:371
#7 0x080b49d2 in ap_process_request (r=0x19520540) at
http_request.c:258
#8 0x080b1ee8 in ap_process_http_connection (c=0x94d44e8)
at http_core.c:171
#9 0x08084264 in ap_run_process_connection (c=0x94d44e8) at
connection.c:43
#10 0x08084693 in ap_process_connection (c=0x94d44e8,
csd=0x94d4338) at
connection.c:178
#11 0x080bddcb in process_socket (p=0x94d42f8,
sock=0x94d4338, my_child_num=0,
my_thread_num=12, bucket_alloc=0x1951c4f8)
at worker.c:531
#12 0x080be5d4 in worker_thread (thd=0x91a05c0,
dummy=0x91dddc8) at worker.c:876
#13 0xb7ef7868 in dummy_worker (opaque=0x91a05c0) at
threadproc/unix/thread.c:138
#14 0x006bb341 in start_thread () from
/lib/tls/libpthread.so.0
#15 0x005e36fe in clone () from /lib/tls/libc.so.6
as mentioned this is the most common one but we even got
segfaults here:
#0 0xb7ed2246 in allocator_free (allocator=0x0,
node=0x9b15110) at
memory/unix/apr_pools.c:319
#1 0xb7ed2224 in apr_allocator_free (allocator=0x0,
node=0x9b15110) at
memory/unix/apr_pools.c:384
#2 0xb7fbd81f in apr_bucket_free (mem=0x9b15138) at
buckets/apr_buckets_alloc.c:182
#3 0xb7fbda6a in socket_bucket_read (a=0x9b011c8,
str=0xb6a47f40,
len=0xb6a47f3c, block=APR_BLOCK_READ)
at buckets/apr_buckets_socket.c:71
#4 0xb7fbe933 in apr_brigade_split_line (bbOut=0x9af8180,
bbIn=0x9af81a8,
block=APR_BLOCK_READ, maxbytes=8192)
at buckets/apr_brigade.c:292
#5 0x0807b024 in ap_core_input_filter (f=0x9af71d0,
b=0x9af8180,
mode=AP_MODE_GETLINE, block=APR_BLOCK_READ, readbytes=0)
at core_filters.c:171
#6 0x080878e3 in ap_get_brigade (next=0x9af71d0,
bb=0x9af8180,
mode=AP_MODE_GETLINE, block=APR_BLOCK_READ, readbytes=0)
at util_filter.c:489
#7 0x0806e358 in ap_rgetline_core (s=0xb6a480a4, n=8192,
read=0xb6a4809c,
r=0x9af7400, fold=0, bb=0x9af8180) at protocol.c:222
#8 0x0806e78f in ap_getline (s=0xb6a48120 "",
n=8192, r=0x9af7400, fold=0) at
protocol.c:463
#9 0x0809b70a in ap_proxy_http_process_response
(p=0x9b04a98, r=0x9b11150,
backend=0x9a94e80, origin=0x9af6f90, conf=0x9a1f9d8,
server_portstr=0xb6a4a190 "") at
mod_proxy_http.c:1214
#10 0x0809c7e2 in proxy_http_handler (r=0x9b11150,
worker=0x9a1fdb0,
conf=0x9a1f9d8, url=0x9b05018
"/test/output.php?delay=1",
proxyname=0x0, proxyport=0) at mod_proxy_http.c:1712
#11 0x080951d5 in proxy_run_scheme_handler (r=0x9b11150,
worker=0x9a1fdb0,
conf=0x9a1f9d8,
url=0x9b123fe "http://
127.0.0.1:8081/test/output.php?delay=1",
proxyhost=0x0, proxyport=0) at mod_proxy.c:1936
#12 0x08092a3d in proxy_handler (r=0x9b11150) at
mod_proxy.c:739
#13 0x0807cdcd in ap_run_handler (r=0x9b11150) at
config.c:157
#14 0x0807d50d in ap_invoke_handler (r=0x9b11150) at
config.c:371
#15 0x080b49d2 in ap_process_request (r=0x9b11150) at
http_request.c:258
#16 0x080b1ee8 in ap_process_http_connection (c=0x9b04c88)
at http_core.c:171
#17 0x08084264 in ap_run_process_connection (c=0x9b04c88) at
connection.c:43
#18 0x08084693 in ap_process_connection (c=0x9b04c88,
csd=0x9b04ad8) at
connection.c:178
#19 0x080bddcb in process_socket (p=0x9b04a98,
sock=0x9b04ad8, my_child_num=0,
my_thread_num=1, bucket_alloc=0x9b06aa0)
at worker.c:531
#20 0x080be5d4 in worker_thread (thd=0x9ab88c0,
dummy=0x9aa8a38) at worker.c:876
#21 0xb7ede868 in dummy_worker (opaque=0x9ab88c0) at
threadproc/unix/thread.c:138
#22 0x006bb341 in start_thread () from
/lib/tls/libpthread.so.0
#23 0x005e36fe in clone () from /lib/tls/libc.so.6
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema
il
------- 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
|