Discussion:
Assert fail in evhttp_connection_fail_ with req=0x00 on error=EVREQ_HTTP_TIMEOUT at http.c:691
(too old to reply)
g***@web.de
2014-08-29 16:30:26 UTC
Permalink
Raw Message
Hi,

when I add new evhttp requests to an running event_loop, I get "epoll ADD: Bad file descriptor" and later "SIGABRT".
The event_base is running in an seperate worker thread, the main thread is doing the evhttp_make_request.

Output from GDB:
http://paste.ubuntu.com/8176676/

Output from GDB with libevent debugging on:
http://paste.ubuntu.com/8176681/

I get the assert fail in the folowing 2 cases:

case 1:
1. add new requests to the running event_base

case 2:
1. call loop_brake from the main thread
2. wait for the loop to "brake" in the worker thread
3. put the worker thread to sleep
4. add new requests
5. wake up the worker thread
6. run the event_loop

Is this bug in libevent or my code?

Best regards,
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
g***@web.de
2014-09-01 07:43:47 UTC
Permalink
Raw Message
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>the problem only occurs with bufferevent_openssl_socket_new when BEV_OPT_DEFER_CALLBACKS is set. Removing BEV_OPT_DEFER_CALLBACKS fixes the problem.
<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b>&nbsp;Freitag, 29. August 2014 um 18:30 Uhr<br/>
<b>Von:</b>&nbsp;***@web.de<br/>
<b>An:</b>&nbsp;libevent-***@seul.org<br/>
<b>Betreff:</b>&nbsp;[Libevent-users] Assert fail in evhttp_connection_fail_ with req=0x00 on error=EVREQ_HTTP_TIMEOUT at http.c:691</div>

<div name="quoted-content">Hi,<br/>
<br/>
when I add new evhttp requests to an running event_loop, I get &quot;epoll ADD: Bad file descriptor&quot; and later &quot;SIGABRT&quot;.<br/>
The event_base is running in an seperate worker thread, the main thread is doing the evhttp_make_request.<br/>
<br/>
Output from GDB:<br/>
<a href="http://paste.ubuntu.com/8176676/" target="_blank">http://paste.ubuntu.com/8176676/</a><br/>
<br/>
Output from GDB with libevent debugging on:<br/>
<a href="http://paste.ubuntu.com/8176681/" target="_blank">http://paste.ubuntu.com/8176681/</a><br/>
<br/>
I get the assert fail in the folowing 2 cases:<br/>
<br/>
case 1:<br/>
1. add new requests to the running event_base<br/>
<br/>
case 2:<br/>
1. call loop_brake from the main thread<br/>
2. wait for the loop to &quot;brake&quot; in the worker thread<br/>
3. put the worker thread to sleep<br/>
4. add new requests<br/>
5. wake up the worker thread<br/>
6. run the event_loop<br/>
<br/>
Is this bug in libevent or my code?<br/>
<br/>
Best regards,<br/>
***********************************************************************<br/>
To unsubscribe, send an e-mail to ***@freehaven.net with<br/>
unsubscribe libevent-users in the body.</div>
</div>
</div>
</div></div></body></html>
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
g***@web.de
2014-09-19 12:40:43 UTC
Permalink
Raw Message
I'm using the "master" from github.

The problem only occurs, when I set a timeout/retry for an https connection(to an server with port 443 closed). The segfault/assert-fail occurs, if I use EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST in combination with the timeouts/retrys.

Testcase:
add the following to sample/https-client.c

struct timeval retry_timeout;
retry_timeout.tv_sec=5;
retry_timeout.tv_usec=0;
evhttp_connection_set_timeout(evcon,15);
evhttp_connection_set_retries(evcon,3);
evhttp_connection_set_initial_retry_tv(evcon,&retry_timeout);

execute: https_client -url https://libevent.org

output:

[warn] Epoll ADD(1) on fd 6 failed. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none): Bad file descriptor
[debug] event_add: event: 0x25a5b30 (fd 6), EV_WRITE EV_TIMEOUT call 0x7f1942897ae4
[warn] Epoll ADD(4) on fd 6 failed. Old events were 0; read change was 0 (none); write change was 1 (add); close change was 0 (none): Bad file descriptor
[debug] event_process_active: event_callback 0x25a5c40, closure 3, call 0x7f1941fc8879
some request failed - no idea which one though!
socket error = Bad file descriptor (9)
 

Gesendet: Donnerstag, 04. September 2014 um 09:44 Uhr
Von: "Azat Khuzhin" <***@gmail.com>
An: libevent-***@freehaven.net
Cc: libevent-***@seul.org
Betreff: Re: [Libevent-users] Assert fail in evhttp_connection_fail_ with req=0x00 on error=EVREQ_HTTP_TIMEOUT at http.c:691
On Fri, Aug 29, 2014 at 06:30:26PM +0200, ***@web.de wrote:
> Hi,
>
> when I add new evhttp requests to an running event_loop, I get "epoll ADD: Bad file descriptor" and later "SIGABRT".
> The event_base is running in an seperate worker thread, the main thread is doing the evhttp_make_request.
>
> Output from GDB:
> http://paste.ubuntu.com/8176676/[http://paste.ubuntu.com/8176676/]
>
> Output from GDB with libevent debugging on:
> http://paste.ubuntu.com/8176681/[http://paste.ubuntu.com/8176681/]
>
> I get the assert fail in the folowing 2 cases:
>
> case 1:
> 1. add new requests to the running event_base
>
> case 2:
> 1. call loop_brake from the main thread
> 2. wait for the loop to "brake" in the worker thread
> 3. put the worker thread to sleep
> 4. add new requests
> 5. wake up the worker thread
> 6. run the event_loop
>
> Is this bug in libevent or my code?

Which version of libevent do you have?
Could you produce simple program or regress test for http (inside
libevent), to test it?

>
> Best regards,
> ***********************************************************************
> To unsubscribe, send an e-mail to ***@freehaven.net with
> unsubscribe libevent-users in the body.

--
Respectfully
Azat Khuzhin
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
g***@web.de
2014-09-21 09:00:33 UTC
Permalink
Raw Message
Full testcase:

diff --git a/sample/https-client.c b/sample/https-client.c
index b5f0b1a..235fe69 100644
--- a/sample/https-client.c
+++ b/sample/https-client.c
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-
+#include <time.h>
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
@@ -334,7 +334,9 @@ main(int argc, char **argv)
#endif // not _WIN32

// Create event base
- base = event_base_new();
+ struct event_config *evcfg = event_config_new();
+ event_config_set_flag(evcfg,EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST);
+ base = event_base_new_with_config(evcfg);
if (!base) {
perror("event_base_new()");
return 1;
@@ -373,6 +375,16 @@ main(int argc, char **argv)
return 1;
}

+
+
+ struct timeval retry_timeout;
+ retry_timeout.tv_sec=5;
+ retry_timeout.tv_usec=0;
+ evhttp_connection_set_timeout(evcon,15);
+ evhttp_connection_set_retries(evcon,3);
+ evhttp_connection_set_initial_retry_tv(evcon,&retry_timeout);
+
+
// Fire off the request
req = evhttp_request_new(http_request_done, bev);
if (req == NULL) {
@@ -414,7 +426,7 @@ main(int argc, char **argv)
}

event_base_dispatch(base);
-
+
evhttp_connection_free(evcon);
event_base_free(base);
 
 

Output:


some request failed - no idea which one though!
socket error = Bad file descriptor (9)
[warn] Epoll ADD(5) on fd 6 failed. Old events were 0; read change was 1 (add); write change was 1 (add); close change was 0 (none): Bad file descriptor
[err] http.c:691: Assertion req != NULL failed in evhttp_connection_fail_
zsh: abort (core dumped) ./https-client -url https://libevent.org


I'm using the latest checkout (master). My system is linux x86_64 3.16.3. I compile with gcc 4.9.1



Gesendet: Freitag, 19. September 2014 um 14:40 Uhr
Von: ***@web.de
An: libevent-***@freehaven.net
Betreff: Re: Re: [Libevent-users] Assert fail in evhttp_connection_fail_ with req=0x00 on error=EVREQ_HTTP_TIMEOUT at http.c:691
I'm using the "master" from github.

The problem only occurs, when I set a timeout/retry for an https connection(to an server with port 443 closed). The segfault/assert-fail occurs, if I use EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST in combination with the timeouts/retrys.

Testcase:
add the following to sample/https-client.c

struct timeval retry_timeout;
retry_timeout.tv_sec=5;
retry_timeout.tv_usec=0;
evhttp_connection_set_timeout(evcon,15);
evhttp_connection_set_retries(evcon,3);
evhttp_connection_set_initial_retry_tv(evcon,&retry_timeout);

execute: https_client -url https://libevent.org

output:

[warn] Epoll ADD(1) on fd 6 failed. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none): Bad file descriptor
[debug] event_add: event: 0x25a5b30 (fd 6), EV_WRITE EV_TIMEOUT call 0x7f1942897ae4
[warn] Epoll ADD(4) on fd 6 failed. Old events were 0; read change was 0 (none); write change was 1 (add); close change was 0 (none): Bad file descriptor
[debug] event_process_active: event_callback 0x25a5c40, closure 3, call 0x7f1941fc8879
some request failed - no idea which one though!
socket error = Bad file descriptor (9)
 

Gesendet: Donnerstag, 04. September 2014 um 09:44 Uhr
Von: "Azat Khuzhin" <***@gmail.com>
An: libevent-***@freehaven.net
Cc: libevent-***@seul.org
Betreff: Re: [Libevent-users] Assert fail in evhttp_connection_fail_ with req=0x00 on error=EVREQ_HTTP_TIMEOUT at http.c:691
On Fri, Aug 29, 2014 at 06:30:26PM +0200, ***@web.de wrote:
> Hi,
>
> when I add new evhttp requests to an running event_loop, I get "epoll ADD: Bad file descriptor" and later "SIGABRT".
> The event_base is running in an seperate worker thread, the main thread is doing the evhttp_make_request.
>
> Output from GDB:
> http://paste.ubuntu.com/8176676/[http://paste.ubuntu.com/8176676/][http://paste.ubuntu.com/8176676/[http://paste.ubuntu.com/8176676/]]
>
> Output from GDB with libevent debugging on:
> http://paste.ubuntu.com/8176681/[http://paste.ubuntu.com/8176681/][http://paste.ubuntu.com/8176681/[http://paste.ubuntu.com/8176681/]]
>
> I get the assert fail in the folowing 2 cases:
>
> case 1:
> 1. add new requests to the running event_base
>
> case 2:
> 1. call loop_brake from the main thread
> 2. wait for the loop to "brake" in the worker thread
> 3. put the worker thread to sleep
> 4. add new requests
> 5. wake up the worker thread
> 6. run the event_loop
>
> Is this bug in libevent or my code?

Which version of libevent do you have?
Could you produce simple program or regress test for http (inside
libevent), to test it?

>
> Best regards,
> ***********************************************************************
> To unsubscribe, send an e-mail to ***@freehaven.net with
> unsubscribe libevent-users in the body.

--
Respectfully
Azat Khuzhin
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
Azat Khuzhin
2014-09-21 19:50:55 UTC
Permalink
Raw Message
On Fri, Sep 19, 2014 at 02:40:43PM +0200, ***@web.de wrote:
> I'm using the "master" from github.
>
> The problem only occurs, when I set a timeout/retry for an https connection(to an server with port 443 closed). The segfault/assert-fail occurs, if I use EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST in combination with the timeouts/retrys.
>
> Testcase:
> add the following to sample/https-client.c
>
> struct timeval retry_timeout;
> retry_timeout.tv_sec=5;
> retry_timeout.tv_usec=0;
> evhttp_connection_set_timeout(evcon,15);
> evhttp_connection_set_retries(evcon,3);
> evhttp_connection_set_initial_retry_tv(evcon,&retry_timeout);
>
> execute: https_client -url https://libevent.org
>
> output:
>
> [warn] Epoll ADD(1) on fd 6 failed. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none): Bad file descriptor
> [debug] event_add: event: 0x25a5b30 (fd 6), EV_WRITE EV_TIMEOUT call 0x7f1942897ae4
> [warn] Epoll ADD(4) on fd 6 failed. Old events were 0; read change was 0 (none); write change was 1 (add); close change was 0 (none): Bad file descriptor
> [debug] event_process_active: event_callback 0x25a5c40, closure 3, call 0x7f1941fc8879
> some request failed - no idea which one though!
> socket error = Bad file descriptor (9)

After digging through syscalls traces, I got the next patch, could you test it
please:
From 6dc4de3005bda27ca1154e6fa2abd323c6d4de44 Mon Sep 17 00:00:00 2001
From: Azat Khuzhin <***@gmail.com>
Date: Sun, 21 Sep 2014 18:29:17 +0400
Subject: [PATCH] bufferevent_openssl: reset fd_is_set when setfd with -1 is
called

Before this patch:
$ sample/https-client -retries 1 -url https://libevent.org
[warn] Epoll ADD(1) on fd 6 failed. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none): Bad file descriptor
[warn] Epoll ADD(4) on fd 6 failed. Old events were 0; read change was 0 (none); write change was 1 (add); close change was 0 (none): Bad file descriptor
some request failed - no idea which one though!
socket error = Bad file descriptor (9)

After this patch:
$ sample/https-client -retries 1 -url https://libevent.org
Response line: 0 (null)

Reported-by: ***@web.de
---
bufferevent_openssl.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c
index 423b34f10097..b30f90ff2e94 100644
--- a/bufferevent_openssl.c
+++ b/bufferevent_openssl.c
@@ -1276,6 +1276,8 @@ be_openssl_ctrl(struct bufferevent *bev,
SSL_set_bio(bev_ssl->ssl, bio, bio);
bev_ssl->fd_is_set = 1;
}
+ if (data->fd == -1)
+ bev_ssl->fd_is_set = 0;
if (bev_ssl->state == BUFFEREVENT_SSL_OPEN)
return set_open_callbacks(bev_ssl, data->fd);
else {
--
2.1.0

Full version of this patch is here:
https://github.com/azat/libevent/commit/3da84c2949cc693bb6e6a65a3b1de48af1be0483.patch

Cheers, Azat.

>  
>
> Gesendet: Donnerstag, 04. September 2014 um 09:44 Uhr
> Von: "Azat Khuzhin" <***@gmail.com>
> An: libevent-***@freehaven.net
> Cc: libevent-***@seul.org
> Betreff: Re: [Libevent-users] Assert fail in evhttp_connection_fail_ with req=0x00 on error=EVREQ_HTTP_TIMEOUT at http.c:691
> On Fri, Aug 29, 2014 at 06:30:26PM +0200, ***@web.de wrote:
> > Hi,
> >
> > when I add new evhttp requests to an running event_loop, I get "epoll ADD: Bad file descriptor" and later "SIGABRT".
> > The event_base is running in an seperate worker thread, the main thread is doing the evhttp_make_request.
> >
> > Output from GDB:
> > http://paste.ubuntu.com/8176676/[http://paste.ubuntu.com/8176676/]
> >
> > Output from GDB with libevent debugging on:
> > http://paste.ubuntu.com/8176681/[http://paste.ubuntu.com/8176681/]
> >
> > I get the assert fail in the folowing 2 cases:
> >
> > case 1:
> > 1. add new requests to the running event_base
> >
> > case 2:
> > 1. call loop_brake from the main thread
> > 2. wait for the loop to "brake" in the worker thread
> > 3. put the worker thread to sleep
> > 4. add new requests
> > 5. wake up the worker thread
> > 6. run the event_loop
> >
> > Is this bug in libevent or my code?
>
> Which version of libevent do you have?
> Could you produce simple program or regress test for http (inside
> libevent), to test it?
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
g***@web.de
2014-09-22 10:13:36 UTC
Permalink
Raw Message
Thank you for your reply.
 
The patch works for my "https-client testcase".
 
I now have the following problem in my program:
 

[err] event_assign called on an already added event 0x7fffe8a29d50 (events: 0x52, fd: 20, flags: 0x83)
[warn] Epoll ADD(5) on fd 20 failed.  Old events were 0; read change was 1 (add); write change was 1 (add); close change was 0 (none): Bad file descriptor
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffef72e700 (LWP 31129)]
0x00007ffff4c33967 in raise () from /usr/lib/libc.so.6
(gdb) bt full
#0  0x00007ffff4c33967 in raise () from /usr/lib/libc.so.6
No symbol table info available.
#1  0x00007ffff4c34d3a in abort () from /usr/lib/libc.so.6
No symbol table info available.
#2  0x00007ffff7bab0b5 in event_exit (errcode=-559030611) at log.c:105
No locals.
#3  0x00007ffff7bab4a2 in event_errx (eval=-559030611, fmt=0x7ffff7bc7a60 "%s called on an already added event %p (events: 0x%x, fd: %d, flags: 0x%x)") at log.c:162
        ap = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7fffef72dc28, reg_save_area = 0x7fffef72db60}}
#4  0x00007ffff7b9c783 in event_assign (ev=0x7fffe8a29d50, base=0xeda2c0, fd=-1, events=82, callback=0x7ffff57d0ae4 <be_openssl_handshakeeventcb>, arg=0x7fffe8a29d40) at event.c:2002
        dent = 0x7fffe8a5d520
        find = {node = {hte_next = 0x0}, ptr = 0x7fffe8a29d50, added = 0}
        __func__ = "event_assign"
#5  0x00007ffff57d0c4b in set_handshake_callbacks (bev_ssl=0x7fffe8a29d40, fd=-1) at bufferevent_openssl.c:1083
        bev = 0x7fffe8a29d40
        r1 = 0
        r2 = 0
#6  0x00007ffff57d143b in be_openssl_ctrl (bev=0x7fffe8a29d40, op=BEV_CTRL_SET_FD, data=0x7fffef72dd40) at bufferevent_openssl.c:1284
        bev_ssl = 0x7fffe8a29d40
#7  0x00007ffff7b917d2 in bufferevent_setfd (bev=0x7fffe8a29d40, fd=-1) at bufferevent.c:850
        d = {ptr = 0xffffffff, fd = -1}
        res = -1
#8  0x00007ffff7bc1b04 in evhttp_connection_connect_ (evcon=0x7fffe8d1a3c0) at http.c:2410
        old_state = 0
        __func__ = "evhttp_connection_connect_"
#9  0x00007ffff7bc1e0c in evhttp_make_request (evcon=0x7fffe8d1a3c0, req=0x7fffe8cd5c00, type=EVHTTP_REQ_GET, uri=0x7fffe8a65000 "/") at http.c:2482
        res = 0
        __func__ = "evhttp_make_request"
#10 0x000000000040cb80 in M_HTTP_main_thread () at ../M_HTTP.cpp:311
        i = 6
        _http_cmd = 0x0
        threadLock = {m = 0xe92ce8, is_locked = true}
#11 0x00000000004174c1 in boost::detail::thread_data<void (*)()>::run (this=0xe92380) at /usr/include/boost/thread/detail/thread.hpp:115
No locals.
#12 0x00007ffff747fdca in ?? () from /usr/lib/libboost_thread.so.1.56.0
No symbol table info available.
#13 0x00007ffff69d1314 in start_thread () from /usr/lib/libpthread.so.0
No symbol table info available.
#14 0x00007ffff4ce83ed in clone () from /usr/lib/libc.so.6
No symbol table info available.
 
 
If I try to prevent this, then I get multiple "Bad file descriptor" messages.
 

Gesendet: Sonntag, 21. September 2014 um 21:50 Uhr
Von: "Azat Khuzhin" <***@gmail.com>
An: libevent-***@freehaven.net
Betreff: Re: Re: [Libevent-users] Assert fail in evhttp_connection_fail_ with req=0x00 on error=EVREQ_HTTP_TIMEOUT at http.c:691
On Fri, Sep 19, 2014 at 02:40:43PM +0200, ***@web.de wrote:
> I'm using the "master" from github.
>
> The problem only occurs, when I set a timeout/retry for an https connection(to an server with port 443 closed). The segfault/assert-fail occurs, if I use EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST in combination with the timeouts/retrys.
>
> Testcase:
> add the following to sample/https-client.c
>
> struct timeval retry_timeout;
> retry_timeout.tv_sec=5;
> retry_timeout.tv_usec=0;
> evhttp_connection_set_timeout(evcon,15);
> evhttp_connection_set_retries(evcon,3);
> evhttp_connection_set_initial_retry_tv(evcon,&retry_timeout);
>
> execute: https_client -url https://libevent.org
>
> output:
>
> [warn] Epoll ADD(1) on fd 6 failed. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none): Bad file descriptor
> [debug] event_add: event: 0x25a5b30 (fd 6), EV_WRITE EV_TIMEOUT call 0x7f1942897ae4
> [warn] Epoll ADD(4) on fd 6 failed. Old events were 0; read change was 0 (none); write change was 1 (add); close change was 0 (none): Bad file descriptor
> [debug] event_process_active: event_callback 0x25a5c40, closure 3, call 0x7f1941fc8879
> some request failed - no idea which one though!
> socket error = Bad file descriptor (9)

After digging through syscalls traces, I got the next patch, could you test it
please:
From 6dc4de3005bda27ca1154e6fa2abd323c6d4de44 Mon Sep 17 00:00:00 2001
From: Azat Khuzhin <***@gmail.com>
Date: Sun, 21 Sep 2014 18:29:17 +0400
Subject: [PATCH] bufferevent_openssl: reset fd_is_set when setfd with -1 is
called

Before this patch:
$ sample/https-client -retries 1 -url https://libevent.org[https://libevent.org]
[warn] Epoll ADD(1) on fd 6 failed. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none): Bad file descriptor
[warn] Epoll ADD(4) on fd 6 failed. Old events were 0; read change was 0 (none); write change was 1 (add); close change was 0 (none): Bad file descriptor
some request failed - no idea which one though!
socket error = Bad file descriptor (9)

After this patch:
$ sample/https-client -retries 1 -url https://libevent.org[https://libevent.org]
Response line: 0 (null)

Reported-by: ***@web.de
---
bufferevent_openssl.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c
index 423b34f10097..b30f90ff2e94 100644
--- a/bufferevent_openssl.c
+++ b/bufferevent_openssl.c
@@ -1276,6 +1276,8 @@ be_openssl_ctrl(struct bufferevent *bev,
SSL_set_bio(bev_ssl->ssl, bio, bio);
bev_ssl->fd_is_set = 1;
}
+ if (data->fd == -1)
+ bev_ssl->fd_is_set = 0;
if (bev_ssl->state == BUFFEREVENT_SSL_OPEN)
return set_open_callbacks(bev_ssl, data->fd);
else {
--
2.1.0

Full version of this patch is here:
https://github.com/azat/libevent/commit/3da84c2949cc693bb6e6a65a3b1de48af1be0483.patch[https://github.com/azat/libevent/commit/3da84c2949cc693bb6e6a65a3b1de48af1be0483.patch]

Cheers, Azat.

>  
>
> Gesendet: Donnerstag, 04. September 2014 um 09:44 Uhr
> Von: "Azat Khuzhin" <***@gmail.com>
> An: libevent-***@freehaven.net
> Cc: libevent-***@seul.org
> Betreff: Re: [Libevent-users] Assert fail in evhttp_connection_fail_ with req=0x00 on error=EVREQ_HTTP_TIMEOUT at http.c:691
> On Fri, Aug 29, 2014 at 06:30:26PM +0200, ***@web.de wrote:
> > Hi,
> >
> > when I add new evhttp requests to an running event_loop, I get "epoll ADD: Bad file descriptor" and later "SIGABRT".
> > The event_base is running in an seperate worker thread, the main thread is doing the evhttp_make_request.
> >
> > Output from GDB:
> > http://paste.ubuntu.com/8176676/[http://paste.ubuntu.com/8176676/][http://paste.ubuntu.com/8176676/[http://paste.ubuntu.com/8176676/]]
> >
> > Output from GDB with libevent debugging on:
> > http://paste.ubuntu.com/8176681/[http://paste.ubuntu.com/8176681/][http://paste.ubuntu.com/8176681/[http://paste.ubuntu.com/8176681/]]
> >
> > I get the assert fail in the folowing 2 cases:
> >
> > case 1:
> > 1. add new requests to the running event_base
> >
> > case 2:
> > 1. call loop_brake from the main thread
> > 2. wait for the loop to "brake" in the worker thread
> > 3. put the worker thread to sleep
> > 4. add new requests
> > 5. wake up the worker thread
> > 6. run the event_loop
> >
> > Is this bug in libevent or my code?
>
> Which version of libevent do you have?
> Could you produce simple program or regress test for http (inside
> libevent), to test it?
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
Azat Khuzhin
2014-09-22 10:35:55 UTC
Permalink
Raw Message
On Mon, Sep 22, 2014 at 12:13:36PM +0200, ***@web.de wrote:
>
>
> Thank you for your reply.
>  
> The patch works for my "https-client testcase".
>  
> I now have the following problem in my program:

Could you please avoid top-posting.

This backtrace is not very useful to me (I need more infromation, like
where the first event was added, and why it is not deleted).
Could you create simple program (~ 100 lines) that will reproduce this?
If so, I could look into it.

Cheers,
Azat.

>  
>
> [err] event_assign called on an already added event 0x7fffe8a29d50 (events: 0x52, fd: 20, flags: 0x83)
> [warn] Epoll ADD(5) on fd 20 failed.  Old events were 0; read change was 1 (add); write change was 1 (add); close change was 0 (none): Bad file descriptor
> Program received signal SIGABRT, Aborted.
> [Switching to Thread 0x7fffef72e700 (LWP 31129)]
> 0x00007ffff4c33967 in raise () from /usr/lib/libc.so.6
> (gdb) bt full
> #0  0x00007ffff4c33967 in raise () from /usr/lib/libc.so.6
> No symbol table info available.
> #1  0x00007ffff4c34d3a in abort () from /usr/lib/libc.so.6
> No symbol table info available.
> #2  0x00007ffff7bab0b5 in event_exit (errcode=-559030611) at log.c:105
> No locals.
> #3  0x00007ffff7bab4a2 in event_errx (eval=-559030611, fmt=0x7ffff7bc7a60 "%s called on an already added event %p (events: 0x%x, fd: %d, flags: 0x%x)") at log.c:162
>         ap = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7fffef72dc28, reg_save_area = 0x7fffef72db60}}
> #4  0x00007ffff7b9c783 in event_assign (ev=0x7fffe8a29d50, base=0xeda2c0, fd=-1, events=82, callback=0x7ffff57d0ae4 <be_openssl_handshakeeventcb>, arg=0x7fffe8a29d40) at event.c:2002
>         dent = 0x7fffe8a5d520
>         find = {node = {hte_next = 0x0}, ptr = 0x7fffe8a29d50, added = 0}
>         __func__ = "event_assign"
> #5  0x00007ffff57d0c4b in set_handshake_callbacks (bev_ssl=0x7fffe8a29d40, fd=-1) at bufferevent_openssl.c:1083
>         bev = 0x7fffe8a29d40
>         r1 = 0
>         r2 = 0
> #6  0x00007ffff57d143b in be_openssl_ctrl (bev=0x7fffe8a29d40, op=BEV_CTRL_SET_FD, data=0x7fffef72dd40) at bufferevent_openssl.c:1284
>         bev_ssl = 0x7fffe8a29d40
> #7  0x00007ffff7b917d2 in bufferevent_setfd (bev=0x7fffe8a29d40, fd=-1) at bufferevent.c:850
>         d = {ptr = 0xffffffff, fd = -1}
>         res = -1
> #8  0x00007ffff7bc1b04 in evhttp_connection_connect_ (evcon=0x7fffe8d1a3c0) at http.c:2410
>         old_state = 0
>         __func__ = "evhttp_connection_connect_"
> #9  0x00007ffff7bc1e0c in evhttp_make_request (evcon=0x7fffe8d1a3c0, req=0x7fffe8cd5c00, type=EVHTTP_REQ_GET, uri=0x7fffe8a65000 "/") at http.c:2482
>         res = 0
>         __func__ = "evhttp_make_request"
> #10 0x000000000040cb80 in M_HTTP_main_thread () at ../M_HTTP.cpp:311
>         i = 6
>         _http_cmd = 0x0
>         threadLock = {m = 0xe92ce8, is_locked = true}
> #11 0x00000000004174c1 in boost::detail::thread_data<void (*)()>::run (this=0xe92380) at /usr/include/boost/thread/detail/thread.hpp:115
> No locals.
> #12 0x00007ffff747fdca in ?? () from /usr/lib/libboost_thread.so.1.56.0
> No symbol table info available.
> #13 0x00007ffff69d1314 in start_thread () from /usr/lib/libpthread.so.0
> No symbol table info available.
> #14 0x00007ffff4ce83ed in clone () from /usr/lib/libc.so.6
> No symbol table info available.
>  
>  
> If I try to prevent this, then I get multiple "Bad file descriptor" messages.
>  
>
> Gesendet: Sonntag, 21. September 2014 um 21:50 Uhr
> Von: "Azat Khuzhin" <***@gmail.com>
> An: libevent-***@freehaven.net
> Betreff: Re: Re: [Libevent-users] Assert fail in evhttp_connection_fail_ with req=0x00 on error=EVREQ_HTTP_TIMEOUT at http.c:691
> On Fri, Sep 19, 2014 at 02:40:43PM +0200, ***@web.de wrote:
> > I'm using the "master" from github.
> >
> > The problem only occurs, when I set a timeout/retry for an https connection(to an server with port 443 closed). The segfault/assert-fail occurs, if I use EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST in combination with the timeouts/retrys.
> >
> > Testcase:
> > add the following to sample/https-client.c
> >
> > struct timeval retry_timeout;
> > retry_timeout.tv_sec=5;
> > retry_timeout.tv_usec=0;
> > evhttp_connection_set_timeout(evcon,15);
> > evhttp_connection_set_retries(evcon,3);
> > evhttp_connection_set_initial_retry_tv(evcon,&retry_timeout);
> >
> > execute: https_client -url https://libevent.org
> >
> > output:
> >
> > [warn] Epoll ADD(1) on fd 6 failed. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none): Bad file descriptor
> > [debug] event_add: event: 0x25a5b30 (fd 6), EV_WRITE EV_TIMEOUT call 0x7f1942897ae4
> > [warn] Epoll ADD(4) on fd 6 failed. Old events were 0; read change was 0 (none); write change was 1 (add); close change was 0 (none): Bad file descriptor
> > [debug] event_process_active: event_callback 0x25a5c40, closure 3, call 0x7f1941fc8879
> > some request failed - no idea which one though!
> > socket error = Bad file descriptor (9)
>
> After digging through syscalls traces, I got the next patch, could you test it
> please:
> From 6dc4de3005bda27ca1154e6fa2abd323c6d4de44 Mon Sep 17 00:00:00 2001
> From: Azat Khuzhin <***@gmail.com>
> Date: Sun, 21 Sep 2014 18:29:17 +0400
> Subject: [PATCH] bufferevent_openssl: reset fd_is_set when setfd with -1 is
> called
>
> Before this patch:
> $ sample/https-client -retries 1 -url https://libevent.org[https://libevent.org]
> [warn] Epoll ADD(1) on fd 6 failed. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none): Bad file descriptor
> [warn] Epoll ADD(4) on fd 6 failed. Old events were 0; read change was 0 (none); write change was 1 (add); close change was 0 (none): Bad file descriptor
> some request failed - no idea which one though!
> socket error = Bad file descriptor (9)
>
> After this patch:
> $ sample/https-client -retries 1 -url https://libevent.org[https://libevent.org]
> Response line: 0 (null)
>
> Reported-by: ***@web.de
> ---
> bufferevent_openssl.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c
> index 423b34f10097..b30f90ff2e94 100644
> --- a/bufferevent_openssl.c
> +++ b/bufferevent_openssl.c
> @@ -1276,6 +1276,8 @@ be_openssl_ctrl(struct bufferevent *bev,
> SSL_set_bio(bev_ssl->ssl, bio, bio);
> bev_ssl->fd_is_set = 1;
> }
> + if (data->fd == -1)
> + bev_ssl->fd_is_set = 0;
> if (bev_ssl->state == BUFFEREVENT_SSL_OPEN)
> return set_open_callbacks(bev_ssl, data->fd);
> else {
> --
> 2.1.0
>
> Full version of this patch is here:
> https://github.com/azat/libevent/commit/3da84c2949cc693bb6e6a65a3b1de48af1be0483.patch[https://github.com/azat/libevent/commit/3da84c2949cc693bb6e6a65a3b1de48af1be0483.patch]
>
> Cheers, Azat.
>
> >  
> >
> > Gesendet: Donnerstag, 04. September 2014 um 09:44 Uhr
> > Von: "Azat Khuzhin" <***@gmail.com>
> > An: libevent-***@freehaven.net
> > Cc: libevent-***@seul.org
> > Betreff: Re: [Libevent-users] Assert fail in evhttp_connection_fail_ with req=0x00 on error=EVREQ_HTTP_TIMEOUT at http.c:691
> > On Fri, Aug 29, 2014 at 06:30:26PM +0200, ***@web.de wrote:
> > > Hi,
> > >
> > > when I add new evhttp requests to an running event_loop, I get "epoll ADD: Bad file descriptor" and later "SIGABRT".
> > > The event_base is running in an seperate worker thread, the main thread is doing the evhttp_make_request.
> > >
> > > Output from GDB:
> > > http://paste.ubuntu.com/8176676/[http://paste.ubuntu.com/8176676/][http://paste.ubuntu.com/8176676/[http://paste.ubuntu.com/8176676/]]
> > >
> > > Output from GDB with libevent debugging on:
> > > http://paste.ubuntu.com/8176681/[http://paste.ubuntu.com/8176681/][http://paste.ubuntu.com/8176681/[http://paste.ubuntu.com/8176681/]]
> > >
> > > I get the assert fail in the folowing 2 cases:
> > >
> > > case 1:
> > > 1. add new requests to the running event_base
> > >
> > > case 2:
> > > 1. call loop_brake from the main thread
> > > 2. wait for the loop to "brake" in the worker thread
> > > 3. put the worker thread to sleep
> > > 4. add new requests
> > > 5. wake up the worker thread
> > > 6. run the event_loop
> > >
> > > Is this bug in libevent or my code?
> >
> > Which version of libevent do you have?
> > Could you produce simple program or regress test for http (inside
> > libevent), to test it?
> ***********************************************************************
> To unsubscribe, send an e-mail to ***@freehaven.net with
> unsubscribe libevent-users in the body.
> ***********************************************************************
> To unsubscribe, send an e-mail to ***@freehaven.net with
> unsubscribe libevent-users in the body.

--
Respectfully
Azat Khuzhin
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
g***@web.de
2014-09-22 11:53:35 UTC
Permalink
Raw Message
Gesendet: Montag, 22. September 2014 um 12:35 Uhr
Von: "Azat Khuzhin" <***@gmail.com>
An: libevent-***@freehaven.net
Betreff: Re: Re: Re: [Libevent-users] Assert fail in evhttp_connection_fail_ with req=0x00 on error=EVREQ_HTTP_TIMEOUT at http.c:691
> On Mon, Sep 22, 2014 at 12:13:36PM +0200, ***@web.de wrote:
> >
> >
> > Thank you for your reply.
> >
> > The patch works for my "https-client testcase".
> >
> > I now have the following problem in my program:
>
> Could you please avoid top-posting.

yes (my client makes this nearly impossible)

> This backtrace is not very useful to me (I need more infromation, like
> where the first event was added, and why it is not deleted).
> Could you create simple program (~ 100 lines) that will reproduce this?
> If so, I could look into it.
>
> Cheers,
> Azat.

Your patch is now working. My last error disappeared somehow (linking problem/typo...).
Thank you for your help.

Best regards,
Johannes Gerken

>
> [err] event_assign called on an already added event 0x7fffe8a29d50 (events: 0x52, fd: 20, flags: 0x83)
> [warn] Epoll ADD(5) on fd 20 failed. Old events were 0; read change was 1 (add); write change was 1 (add); close change was 0 (none): Bad file descriptor
> Program received signal SIGABRT, Aborted.
> [Switching to Thread 0x7fffef72e700 (LWP 31129)]
> 0x00007ffff4c33967 in raise () from /usr/lib/libc.so.6
> (gdb) bt full
> #0 0x00007ffff4c33967 in raise () from /usr/lib/libc.so.6
> No symbol table info available.
> #1 0x00007ffff4c34d3a in abort () from /usr/lib/libc.so.6
> No symbol table info available.
> #2 0x00007ffff7bab0b5 in event_exit (errcode=-559030611) at log.c:105
> No locals.
> #3 0x00007ffff7bab4a2 in event_errx (eval=-559030611, fmt=0x7ffff7bc7a60 "%s called on an already added event %p (events: 0x%x, fd: %d, flags: 0x%x)") at log.c:162
> ap = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7fffef72dc28, reg_save_area = 0x7fffef72db60}}
> #4 0x00007ffff7b9c783 in event_assign (ev=0x7fffe8a29d50, base=0xeda2c0, fd=-1, events=82, callback=0x7ffff57d0ae4 <be_openssl_handshakeeventcb>, arg=0x7fffe8a29d40) at event.c:2002
> dent = 0x7fffe8a5d520
> find = {node = {hte_next = 0x0}, ptr = 0x7fffe8a29d50, added = 0}
> __func__ = "event_assign"
> #5 0x00007ffff57d0c4b in set_handshake_callbacks (bev_ssl=0x7fffe8a29d40, fd=-1) at bufferevent_openssl.c:1083
> bev = 0x7fffe8a29d40
> r1 = 0
> r2 = 0
> #6 0x00007ffff57d143b in be_openssl_ctrl (bev=0x7fffe8a29d40, op=BEV_CTRL_SET_FD, data=0x7fffef72dd40) at bufferevent_openssl.c:1284
> bev_ssl = 0x7fffe8a29d40
> #7 0x00007ffff7b917d2 in bufferevent_setfd (bev=0x7fffe8a29d40, fd=-1) at bufferevent.c:850
> d = {ptr = 0xffffffff, fd = -1}
> res = -1
> #8 0x00007ffff7bc1b04 in evhttp_connection_connect_ (evcon=0x7fffe8d1a3c0) at http.c:2410
> old_state = 0
> __func__ = "evhttp_connection_connect_"
> #9 0x00007ffff7bc1e0c in evhttp_make_request (evcon=0x7fffe8d1a3c0, req=0x7fffe8cd5c00, type=EVHTTP_REQ_GET, uri=0x7fffe8a65000 "/") at http.c:2482
> res = 0
> __func__ = "evhttp_make_request"
> #10 0x000000000040cb80 in M_HTTP_main_thread () at ../M_HTTP.cpp:311
> i = 6
> _http_cmd = 0x0
> threadLock = {m = 0xe92ce8, is_locked = true}
> #11 0x00000000004174c1 in boost::detail::thread_data<void (*)()>::run (this=0xe92380) at /usr/include/boost/thread/detail/thread.hpp:115
> No locals.
> #12 0x00007ffff747fdca in ?? () from /usr/lib/libboost_thread.so.1.56.0
> No symbol table info available.
> #13 0x00007ffff69d1314 in start_thread () from /usr/lib/libpthread.so.0
> No symbol table info available.
> #14 0x00007ffff4ce83ed in clone () from /usr/lib/libc.so.6
> No symbol table info available.
>
>
> If I try to prevent this, then I get multiple "Bad file descriptor" messages.
>
>
> Gesendet: Sonntag, 21. September 2014 um 21:50 Uhr
> Von: "Azat Khuzhin" <***@gmail.com>
> An: libevent-***@freehaven.net
> Betreff: Re: Re: [Libevent-users] Assert fail in evhttp_connection_fail_ with req=0x00 on error=EVREQ_HTTP_TIMEOUT at http.c:691
> On Fri, Sep 19, 2014 at 02:40:43PM +0200, ***@web.de wrote:
> > I'm using the "master" from github.
> >
> > The problem only occurs, when I set a timeout/retry for an https connection(to an server with port 443 closed). The segfault/assert-fail occurs, if I use EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST in combination with the timeouts/retrys.
> >
> > Testcase:
> > add the following to sample/https-client.c
> >
> > struct timeval retry_timeout;
> > retry_timeout.tv_sec=5;
> > retry_timeout.tv_usec=0;
> > evhttp_connection_set_timeout(evcon,15);
> > evhttp_connection_set_retries(evcon,3);
> > evhttp_connection_set_initial_retry_tv(evcon,&retry_timeout);
> >
> > execute: https_client -url https://libevent.org
> >
> > output:
> >
> > [warn] Epoll ADD(1) on fd 6 failed. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none): Bad file descriptor
> > [debug] event_add: event: 0x25a5b30 (fd 6), EV_WRITE EV_TIMEOUT call 0x7f1942897ae4
> > [warn] Epoll ADD(4) on fd 6 failed. Old events were 0; read change was 0 (none); write change was 1 (add); close change was 0 (none): Bad file descriptor
> > [debug] event_process_active: event_callback 0x25a5c40, closure 3, call 0x7f1941fc8879
> > some request failed - no idea which one though!
> > socket error = Bad file descriptor (9)
>
> After digging through syscalls traces, I got the next patch, could you test it
> please:
> From 6dc4de3005bda27ca1154e6fa2abd323c6d4de44 Mon Sep 17 00:00:00 2001
> From: Azat Khuzhin <***@gmail.com>
> Date: Sun, 21 Sep 2014 18:29:17 +0400
> Subject: [PATCH] bufferevent_openssl: reset fd_is_set when setfd with -1 is
> called
>
> Before this patch:
> $ sample/https-client -retries 1 -url https://libevent.org[https://libevent.org]
> [warn] Epoll ADD(1) on fd 6 failed. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none): Bad file descriptor
> [warn] Epoll ADD(4) on fd 6 failed. Old events were 0; read change was 0 (none); write change was 1 (add); close change was 0 (none): Bad file descriptor
> some request failed - no idea which one though!
> socket error = Bad file descriptor (9)
>
> After this patch:
> $ sample/https-client -retries 1 -url https://libevent.org[https://libevent.org]
> Response line: 0 (null)
>
> Reported-by: ***@web.de
> ---
> bufferevent_openssl.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c
> index 423b34f10097..b30f90ff2e94 100644
> --- a/bufferevent_openssl.c
> +++ b/bufferevent_openssl.c
> @@ -1276,6 +1276,8 @@ be_openssl_ctrl(struct bufferevent *bev,
> SSL_set_bio(bev_ssl->ssl, bio, bio);
> bev_ssl->fd_is_set = 1;
> }
> + if (data->fd == -1)
> + bev_ssl->fd_is_set = 0;
> if (bev_ssl->state == BUFFEREVENT_SSL_OPEN)
> return set_open_callbacks(bev_ssl, data->fd);
> else {
> --
> 2.1.0
>
> Full version of this patch is here:
> https://github.com/azat/libevent/commit/3da84c2949cc693bb6e6a65a3b1de48af1be0483.patch[https://github.com/azat/libevent/commit/3da84c2949cc693bb6e6a65a3b1de48af1be0483.patch]
>
> Cheers, Azat.
>
> >
> >
> > Gesendet: Donnerstag, 04. September 2014 um 09:44 Uhr
> > Von: "Azat Khuzhin" <***@gmail.com>
> > An: libevent-***@freehaven.net
> > Cc: libevent-***@seul.org
> > Betreff: Re: [Libevent-users] Assert fail in evhttp_connection_fail_ with req=0x00 on error=EVREQ_HTTP_TIMEOUT at http.c:691
> > On Fri, Aug 29, 2014 at 06:30:26PM +0200, ***@web.de wrote:
> > > Hi,
> > >
> > > when I add new evhttp requests to an running event_loop, I get "epoll ADD: Bad file descriptor" and later "SIGABRT".
> > > The event_base is running in an seperate worker thread, the main thread is doing the evhttp_make_request.
> > >
> > > Output from GDB:
> > > http://paste.ubuntu.com/8176676/[http://paste.ubuntu.com/8176676/][http://paste.ubuntu.com/8176676/[http://paste.ubuntu.com/8176676/]]
> > >
> > > Output from GDB with libevent debugging on:
> > > http://paste.ubuntu.com/8176681/[http://paste.ubuntu.com/8176681/][http://paste.ubuntu.com/8176681/[http://paste.ubuntu.com/8176681/]]
> > >
> > > I get the assert fail in the folowing 2 cases:
> > >
> > > case 1:
> > > 1. add new requests to the running event_base
> > >
> > > case 2:
> > > 1. call loop_brake from the main thread
> > > 2. wait for the loop to "brake" in the worker thread
> > > 3. put the worker thread to sleep
> > > 4. add new requests
> > > 5. wake up the worker thread
> > > 6. run the event_loop
> > >
> > > Is this bug in libevent or my code?
> >
> > Which version of libevent do you have?
> > Could you produce simple program or regress test for http (inside
> > libevent), to test it?
> ***********************************************************************
> To unsubscribe, send an e-mail to ***@freehaven.net with
> unsubscribe libevent-users in the body.
> ***********************************************************************
> To unsubscribe, send an e-mail to ***@freehaven.net with
> unsubscribe libevent-users in the body.

--
Respectfully
Azat Khuzhin
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
Azat Khuzhin
2014-09-22 12:07:12 UTC
Permalink
Raw Message
On Mon, Sep 22, 2014 at 01:53:35PM +0200, ***@web.de wrote:
> Gesendet: Montag, 22. September 2014 um 12:35 Uhr
> Von: "Azat Khuzhin" <***@gmail.com>
> An: libevent-***@freehaven.net
> Betreff: Re: Re: Re: [Libevent-users] Assert fail in evhttp_connection_fail_ with req=0x00 on error=EVREQ_HTTP_TIMEOUT at http.c:691
> > On Mon, Sep 22, 2014 at 12:13:36PM +0200, ***@web.de wrote:
> > >
> > >
> > > Thank you for your reply.
> > >
> > > The patch works for my "https-client testcase".
> > >
> > > I now have the following problem in my program:
> >
> > Could you please avoid top-posting.
>
> yes (my client makes this nearly impossible)
>
> > This backtrace is not very useful to me (I need more infromation, like
> > where the first event was added, and why it is not deleted).
> > Could you create simple program (~ 100 lines) that will reproduce this?
> > If so, I could look into it.
> >
> > Cheers,
> > Azat.
>
> Your patch is now working. My last error disappeared somehow (linking problem/typo...).
> Thank you for your help.

Okay, thanks for testing this.
Here is a pull request:
https://github.com/libevent/libevent/pull/171

Thanks,
Azat.
***********************************************************************
To unsubscribe, send an e-mail to ***@freehaven.net with
unsubscribe libevent-users in the body.
Loading...