Most recent backtrace: _______ | ___|.--.--.-----. | ___|| | | -__| Eve - HTTP event server |_______| \___/|_____| Copyright 2009-2010 David Titarenco ================================================================ Daemonizing... See you around! [New Thread 0xb799d6d0 (LWP 30627)] [New Thread 0xb799cb90 (LWP 30636)] [Thread 0xb799cb90 (LWP 30636) exited]
Program received signal SIGSEGV, Segmentation fault. 0xb7c929b4 in free () from /lib/libc.so.6 (gdb) bt #0 0xb7c929b4 in free () from /lib/libc.so.6 #1 0xb7f6e798 in mm_free (ptr=0x59) at event.c:2407 #2 0xb7f84d76 in evhttp_response_code (req=0x51, code=503, reason=0x813d288 "ERROR") at http.c:2179 #3 0xb7f8a023 in evhttp_send_reply (req=0x8a60128, code=503, reason=0x813d288 "ERROR", databuf=0x8a667d8) at http.c:2093 #4 0x081190ef in long_polling_bead (it={_M_node = 0xb7d6c170}) at eve.new.cpp:394 #5 0x08119c85 in handle_beads () at eve.new.cpp:485 #6 0x08119cd6 in iterate_cb (fd=-1, event=1, arg=0x0) at eve.new.cpp:490 #7 0xb7f734f9 in event_base_loop (base=0x8a5d9c0, flags=0) at event.c:1170 #8 0xb7f74095 in event_base_dispatch (event_base=0x8a5d9c0) at event.c:1250 #9 0x08118c93 in main (argc=1, argv=0xbfac0a14) at eve.new.cpp:631 (gdb) frame 3 #3 0xb7f8a023 in evhttp_send_reply (req=0x8a60128, code=503, reason=0x813d288 "ERROR", databuf=0x8a667d8) at http.c:2093 2093 evhttp_response_code(req, code, reason); Current language: auto; currently c (gdb) p req $1 = (struct evhttp_request *) 0x8a60128 (gdb) p *req $2 = {next = {tqe_next = 0x0, tqe_prev = 0x11}, evcon = 0x8a5fcc8, flags = -1210662536, input_headers = 0x10, output_headers = 0x18, remote_host = 0x6 <Address 0x6 out of bounds>, remote_port = 6, kind = EVHTTP_RESPONSE, type = 1213486401, headers_size = 21071, body_size = 17, uri = 0x5 <Address 0x5 out of bounds>, major = -48 '�', minor = -63 '�', response_code = 503, response_code_line = 0x59 <Address 0x59 out of bounds>, input_buffer = 0x8a67fa8, ntoread = 7310874248856597888, chunked = -1, userdone = -1, output_buffer = 0x45565f4c, cb = 0x41, cb_arg = 0x8a641e0, chunk_cb = 0x8a5f580} (gdb) frame 2 #2 0xb7f84d76 in evhttp_response_code (req=0x51, code=503, reason=0x813d288 "ERROR") at http.c:2179 2179 mm_free(req->response_code_line); (gdb) p *req Cannot access memory at address 0x51 (gdb) quit Somewhere between 2 and 3 the request is prematurely freed. Any ideas? Is there a libevent request kill capability that could be "cleaning up" requests without me knowing? Also, is there any way I can verify whether or not a request exists before I try to mess with it. At least to avoid the SIGSEGV. Regards, -David