On Wed, May 25, 2011 at 5:29 AM, Alexey Ozeritsky
<aozeritsky@xxxxxxxxx> wrote:
Hello,
I got assertion in http.c:689 (Assertion req != NULL failed in
evhttp_connection_fail)
libevent version 2.0.11
Stack trace:
(gdb) where
#0 0x00007f83465d3095 in raise () from /lib/libc.so.6
#1 0x00007f83465d4af0 in abort () from /lib/libc.so.6
#2 0x000000000042ce92 in event_exit ()
#3 0x000000000042d378 in event_errx ()
#4 0x0000000000433d73 in evhttp_connection_fail ()
#5 0x00000000004350f9 in evhttp_error_cb ()
#6 0x000000000043515c in evhttp_connection_cb ()
#7 0x0000000000428062 in _bufferevent_run_eventcb ()
#8 0x0000000000446f69 in bufferevent_socket_connect ()
#9 0x000000000044704b in bufferevent_connect_getaddrinfo_cb ()
#10 0x000000000042f158 in evutil_getaddrinfo_async ()
#11 0x00000000004471f0 in bufferevent_socket_connect_hostname ()
#12 0x0000000000436a78 in evhttp_connection_connect ()
#13 0x0000000000436c23 in evhttp_make_request ()
#14 0x0000000000412675 in do_advice (s=-1, p=1, arg=0x6783b0)
at /home/aozeritsky/projects/push-client/src/network.c:710
#15 0x000000000041bc22 in event_process_active_single_queue ()
#16 0x000000000041c17f in event_process_active ()
#17 0x000000000041c75a in event_base_loop ()
#18 0x0000000000413556 in network_loop (unused=0x0)
at /home/aozeritsky/projects/push-client/src/network.c:1048
#19 0x00007f83469093f7 in start_thread () from /lib/libpthread.so.0
#20 0x00007f8346678b4d in clone () from /lib/libc.so.6
#21 0x0000000000000000 in ?? ()
evhttp_connection was created with fake address:
conn = evhttp_connection_base_new(event_base, 0, addr /* "8081" <-
fake */, port /* 80 <- ok*/);
......
req = evhttp_request_new(on_advice, t);
assert(req != 0);
evhttp_add_header(req->output_headers, "Host", host);
evhttp_add_header(req->output_headers, "Connection", "close");
....
evhttp_make_request(conn, req, EVHTTP_REQ_GET, uri); /* <- got assertion here */
Is it expected behaviour or bug ?
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.