RE: [Libevent-users] deadlock in libevent-2.0.5-beta

2010-07-05 Thread Avi Bab
Behalf Of Nick Mathewson Sent: Monday, July 05, 2010 8:05 PM To: libevent-us...@freehaven.net Subject: Re: [Libevent-users] deadlock in libevent-2.0.5-beta On Mon, Jul 5, 2010 at 3:03 AM, Avi Bab wrote: > > I now have a clearer view of things. > Like Zhou said - there is a thread adding an

Re: [Libevent-users] deadlock in libevent-2.0.5-beta

2010-07-05 Thread Nick Mathewson
On Mon, Jul 5, 2010 at 3:03 AM, Avi Bab wrote: > > I now have a clearer view of things. > Like Zhou said - there is a thread adding an event to the sender's event_base > which is blocked on writing to base->th_notify_fd[1]: Oho! Indeed, this is absolutely right. My apologies to Zhou Li for not

RE: [Libevent-users] deadlock in libevent-2.0.5-beta

2010-07-05 Thread Avi Bab
l Message- From: owner-libevent-us...@freehaven.net [mailto:owner-libevent-us...@freehaven.net] On Behalf Of Nick Mathewson Sent: Sunday, July 04, 2010 4:54 PM To: libevent-us...@freehaven.net Subject: Re: [Libevent-users] deadlock in libevent-2.0.5-beta On Sun, Jul 4, 2010 at 4:29 AM, Avi Bab wrote: >

Re: [Libevent-users] deadlock in libevent-2.0.5-beta

2010-07-05 Thread Scott Lamb
On Sun, Jul 4, 2010 at 6:43 AM, Nick Mathewson wrote: > On Sat, Jul 3, 2010 at 2:10 AM, Zhou Li wrote: >> I met such deadlock too. It happened under very high load just as you said. >> I think the cause is that the call write(th_notify_fd[1]) got blocked ( >> sorry I didn't remember the exact pos

Re: [Libevent-users] deadlock in libevent-2.0.5-beta

2010-07-04 Thread Nick Mathewson
On Sun, Jul 4, 2010 at 4:29 AM, Avi Bab wrote: > > Indeed it seems that someone, some when, failed to release the lock. > At the time of the deadlock the third thread (The ReceiverThread) is > dispatching on a different eventbase. > > This third thread does do some manipulation on bufferevents th

Re: [Libevent-users] deadlock in libevent-2.0.5-beta

2010-07-04 Thread Nick Mathewson
On Sat, Jul 3, 2010 at 2:10 AM, Zhou Li wrote: > I met such deadlock too. It happened under very high load just as you said. > I think the cause is that the call write(th_notify_fd[1]) got blocked ( > sorry I didn't remember the exact position of this call to write > th_notify_fd). > In event.c li

RE: [Libevent-users] deadlock in libevent-2.0.5-beta

2010-07-04 Thread Avi Bab
Apologies - this seems to be incorrect From: owner-libevent-us...@freehaven.net [mailto:owner-libevent-us...@freehaven.net] On Behalf Of Avi Bab Sent: Sunday, July 04, 2010 2:04 PM To: libevent-us...@freehaven.net Subject: RE: [Libevent-users] deadlock in libevent-2.0.5-beta Prior to this

RE: [Libevent-users] deadlock in libevent-2.0.5-beta

2010-07-04 Thread Avi Bab
...@freehaven.net [mailto:owner-libevent-us...@freehaven.net] On Behalf Of Avi Bab Sent: Sunday, July 04, 2010 1:41 PM To: libevent-us...@freehaven.net Subject: RE: [Libevent-users] deadlock in libevent-2.0.5-beta This made a great improvement - the deadlock still appears but only on even higher loads

RE: [Libevent-users] deadlock in libevent-2.0.5-beta

2010-07-04 Thread Avi Bab
: [Libevent-users] deadlock in libevent-2.0.5-beta I met such deadlock too. It happened under very high load just as you said. I think the cause is that the call write(th_notify_fd[1]) got blocked ( sorry I didn't remember the exact position of this call to write th_notify_fd). In event.c

RE: [Libevent-users] deadlock in libevent-2.0.5-beta

2010-07-04 Thread Avi Bab
e a relation to the deadlock. Thanks, Avi -Original Message- From: owner-libevent-us...@freehaven.net [mailto:owner-libevent-us...@freehaven.net] On Behalf Of Nick Mathewson Sent: Friday, July 02, 2010 8:48 PM To: libevent-us...@freehaven.net Subject: Re: [Libevent-users] deadlock in

Re: [Libevent-users] deadlock in libevent-2.0.5-beta

2010-07-02 Thread Zhou Li
I met such deadlock too. It happened under very high load just as you said. I think the cause is that the call write(th_notify_fd[1]) got blocked ( sorry I didn't remember the exact position of this call to write th_notify_fd). In event.c line 2597: /* This can't be right, can it? We w

Re: [Libevent-users] deadlock in libevent-2.0.5-beta

2010-07-02 Thread Nick Mathewson
On Thu, Jul 1, 2010 at 6:44 AM, Avi Bab wrote: > > > Running on Linux with pthreads. > > > > One thread (CBTcpProxyListenerThread below) adds bufferevents (with option > BEV_OPT_THREADSAFE) to an event_base. > > A second thread (CBTcpProxySenderThread) dispatches on the event_base. > > > > buffere

Re: [Libevent-users] deadlock in libevent-2.0.5-beta

2010-07-02 Thread Joachim Bauch
Hi, On 01.07.2010 12:44, Avi Bab wrote: Running on Linux with pthreads. One thread (CBTcpProxyListenerThread below) adds bufferevents (with option BEV_OPT_THREADSAFE) to an event_base. A second thread (CBTcpProxySenderThread) dispatches on the event_base. have you tried creating your buffere

[Libevent-users] deadlock in libevent-2.0.5-beta

2010-07-01 Thread Avi Bab
Running on Linux with pthreads. One thread (CBTcpProxyListenerThread below) adds bufferevents (with option BEV_OPT_THREADSAFE) to an event_base. A second thread (CBTcpProxySenderThread) dispatches on the event_base. bufferevents are removed from the event_base either by a third thread or by the