Re: [Libevent-users] random crashed by [err] event_queue_remove:not on queue 8

2013-02-19 Thread Tony Qin
> Debug mode and debug logs are different things; if you can't store the > debug logs, you can still enable debugging mode without turning on > debug logs. > how to enable debug mode without turning on debug log? only set the following line does not work: int _event_debug_mode_on = 1; **

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-19 Thread Jardel Weyrich
On Tue, Feb 19, 2013 at 7:07 PM, Catalin Patulea wrote: > On Tue, Feb 19, 2013 at 3:05 PM, Nick Mathewson > wrote: > >* It could sure use comments! > Can you be more specific? This all feels like a lot of boilerplate to > me. Parse the URL, initialize OpenSSL, create some bufferevents. I'm >

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-19 Thread Catalin Patulea
On Tue, Feb 19, 2013 at 3:05 PM, Nick Mathewson wrote: >* It could sure use comments! Can you be more specific? This all feels like a lot of boilerplate to me. Parse the URL, initialize OpenSSL, create some bufferevents. I'm not sure what more I can say that a reader of bufferevent.h, bufferev

Re: [Libevent-users] Re: [PATCH] http: on connection reset, detach the closed fd from the bufferevent

2013-02-19 Thread Catalin Patulea
I don't know. I did the debugging on this about 3 weeks ago and my cache is very cold at the moment. Shouldn't bufferevent_disable_hard_(bufev, EV_READ|EV_WRITE) have cleared any fd out of the evmap and epoll? Looking at be_socket_disable: if (event & EV_READ) { if (event_del(&bufev->ev_read)

Re: [Libevent-users] Re: [PATCH] http: on connection reset, detach the closed fd from the bufferevent

2013-02-19 Thread Catalin Patulea
On Tue, Feb 19, 2013 at 4:17 PM, Nick Mathewson wrote: > But the patch isn't quite optimal for that -- we should do the > bufferevent_setfd() before we close the socket, not after. That way > there's never a non-deleted event that refers to the fd. The idea with doing the setfd there was in the c

Re: [Libevent-users] Re: [PATCH] http: on connection reset, detach the closed fd from the bufferevent

2013-02-19 Thread Nick Mathewson
On Tue, Feb 19, 2013 at 11:57 AM, Catalin Patulea wrote: > On Tue, Feb 19, 2013 at 11:49 AM, Nick Mathewson wrote: >> Could you be more specific about the good results, and how to >> reproduce them? Or how to reproduce/observe the undesired behavior? >> It would also be good to have an explanati

Re: [Libevent-users] use windows threads leak

2013-02-19 Thread Nick Mathewson
On Tue, Feb 19, 2013 at 1:23 PM, Brett Harrison wrote: > I am using 2.0.21-stable on windows. When shutting down the server I get 3 > memory leaks (see below). > > Is there a clean function I should be calling when using windows threads? In Libevent 2.1, there is libevent_global_shutdown(). In

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-19 Thread Nick Mathewson
On Tue, Feb 19, 2013 at 3:05 PM, Nick Mathewson wrote: > On Tue, Feb 19, 2013 at 12:22 PM, Catalin Patulea wrote: >> >> Signed-off-by: Catalin Patulea >> --- >> .gitignore| 1 + >> sample/https-client.c | 207 >> ++ >> sample/includ

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-19 Thread Nick Mathewson
On Tue, Feb 19, 2013 at 12:22 PM, Catalin Patulea wrote: > > Signed-off-by: Catalin Patulea > --- > .gitignore| 1 + > sample/https-client.c | 207 > ++ > sample/include.am | 5 ++ > 3 files changed, 213 insertions(+) > create

[Libevent-users] use windows threads leak

2013-02-19 Thread Brett Harrison
I am using 2.0.21-stable on windows. When shutting down the server I get 3 memory leaks (see below). Is there a clean function I should be calling when using windows threads? WARNING: Visual Leak Detector detected memory leaks! -- Block 5344 at 0x01FE0040: 40 bytes -- Lea

[Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.

2013-02-19 Thread Catalin Patulea
Signed-off-by: Catalin Patulea --- .gitignore| 1 + sample/https-client.c | 207 ++ sample/include.am | 5 ++ 3 files changed, 213 insertions(+) create mode 100644 sample/https-client.c diff --git a/.gitignore b/.gitignore ind

Re: [Libevent-users] Re: [PATCH] http: on connection reset, detach the closed fd from the bufferevent

2013-02-19 Thread Catalin Patulea
On Tue, Feb 19, 2013 at 11:49 AM, Nick Mathewson wrote: > Could you be more specific about the good results, and how to > reproduce them? Or how to reproduce/observe the undesired behavior? > It would also be good to have an explanation of how the patch is > supposed to work. I had a lot of troub

Re: [Libevent-users] Re: [PATCH] http: on connection reset, detach the closed fd from the bufferevent

2013-02-19 Thread Nick Mathewson
On Tue, Feb 19, 2013 at 11:35 AM, Catalin Patulea wrote: > [-cc: my personal email, added by mistake] > > Ping. We've been seeing good results with this. Could you be more specific about the good results, and how to reproduce them? Or how to reproduce/observe the undesired behavior? It would als

[Libevent-users] Re: [PATCH] http: on connection reset, detach the closed fd from the bufferevent

2013-02-19 Thread Catalin Patulea
[-cc: my personal email, added by mistake] Ping. We've been seeing good results with this. On Wed, Dec 19, 2012 at 11:05 AM, Catalin Patulea wrote: > From: Catalin Patulea > > I'm curious what people think of a patch like this.. I've been seeing fds > getting reused and bufferevents adding/rem

Re: [Libevent-users] random crashed by [err] event_queue_remove:not on queue 8

2013-02-19 Thread Nick Mathewson
On Mon, Feb 18, 2013 at 9:41 PM, Tony Qin wrote: > humm when I enable the debug mode in libevent, it will dump > GB-level log and not easy to check specific event. Also, the crash > does not always happen in any time running. Debug mode and debug logs are different things; if you can't store