Hi, i've received a http/dns related crash inside libevent code, and i'm not sure if it's a libevent bug or my application's bug.
I'm using 2.0.7-rc on linux. The code that uses the http code is here http://github.com/vampirefrog/frogmod-justice/blob/master/fpsgame/server.cpp#L746 Lines 746-790. It tries to do a simple POST request to a pre-configured URL. The backtrace: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb74af6c0 (LWP 8189)] evhttp_request_get_input_buffer (req=0x8a57dd0) at http.c:3014 3014 { Current language: auto; currently c (gdb) backtrace #0 evhttp_request_get_input_buffer (req=0x8a57dd0) at http.c:3014 #1 0x080919fe in _bufferevent_run_eventcb (bufev=0x20, what=0) at bufferevent.c:264 #2 0x080928bd in bufferevent_connect_getaddrinfo_cb (result=-4, ai=0x8a47d50, arg=0x8a57dd0) at bufferevent_sock.c:444 #3 0x0809fa39 in evdns_getaddrinfo_timeout_cb (fd=-1, what=1, ptr=0x8a58100) at evdns.c:4112 #4 0x0808a5aa in event_base_loop (base=0x8607660, flags=<value optimized out>) at event.c:1288 #5 0x0808b1b9 in event_base_dispatch (event_base=0x8607660) at event.c:1382 #6 0x08061439 in rundedicatedserver () at /home/mihai/frogmod-justice/engine/server.cpp:828 #7 0x08062c10 in initserver (listen=true, dedicated=true) at /home/mihai/frogmod-justice/engine/server.cpp:1010 #8 0x08062d08 in main (argc=1, argv=0xbfdac3a4) at /home/mihai/frogmod-justice/engine/server.cpp:107 I've stopped gdb without saving a core dump, but this crash has happened before and it will happen again. It seems to be related to dns timeout. If i add the http host in /etc/hosts, this crash doesn't happen anymore. *********************************************************************** To unsubscribe, send an e-mail to [email protected] with unsubscribe libevent-users in the body.
