[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

RE: [Libevent-users] Chicken and Egg when disconnecting users from a threaded base



Hi Kevin,

	Wish I could give you an answer but this looks very similar to the
shutdown issue I had before work pulled me away to other things for the last
couple months.  With 1000 sockets and 10% at anytime connecting or
disconnecting I loose about 1% of the disconnections to this issue, say
about 1 a second fails to shutdown correctly.  I still have the test code
running around somewhere, if you get any traction on this I would be willing
to help try and track it down/test any patches, though I'm on limited time
right now due to alpha tasks.

KB

> Having a bit of trouble handling disconnects with libevent
> 
> Right now, we disable the event from a worker and call
> bufferevent_free from there.  However, as seen in the included back
> trace, there is a race between the event base trying to acquire
> another reference.
> 
> In general, how should this problem be solved?  Is it possible to do
> without barrier all of the workers, or does the disconnect have to
> happen from the event base's thread?
> 
> Seen below, Thread 1 is the event base and Thread 3 is the active
> worker running a disconnect job.


***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.