[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] More Segfaulting
- To: libevent-users@xxxxxxxxxxxxx
- Subject: [Libevent-users] More Segfaulting
- From: David Titarenco <david.titarenco@xxxxxxxxx>
- Date: Thu, 25 Mar 2010 15:00:38 -0700
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Thu, 25 Mar 2010 18:00:48 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=/fiV/hZ4Q+gNI1xXOaa9F89zwKTy9nQ68IGfcCL1ICg=; b=w5DMgKLinP4MFIDh1NdGcGhe9ihFXTXy0rJ3wzuDm1iXtF/IaNsxZGVjZ23UwMnLYV 8ZhiG1Oukh7+eOdXpWQfDqtOJY/QlnyC2euxUayxc7nvdP03Sr4HAxNF1RE+X7Jhc3Uy IOAcrmhMoNzAuVrbcUXKbsZfdmINmRMgC6/+k=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=gXgokls0n5UxUDceNeIQy5zP4wf4GMGrh92RhLEVyf7JQZ/BxYPtipASz+1EnVX6GE 4aTWdgBYmec39w5uIso3oRyHzz7bxRnU3PJ+lcOqwY7/QV+Uotb2MibD1Mc6At9JU0Py hPBxRpWKEoptB1jRnCO//mX5AoYRDaittFrD0=
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
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