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

Re: [Libevent-users] Deadlock when calling bufferevent_free from an other thread



On Wed, Aug 8, 2012 at 2:52 PM, Nick Mathewson <nickm@xxxxxxxxxxxxx> wrote:
> On Mon, Aug 6, 2012 at 2:42 PM, Matthieu Nottale
> <mnottale@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>> Hi.
>>
>> I'm experiencing a deadlock on 2.0.19 while calling bufferevent_free frome
>> thread A, while thread B is in event_base_dispatch.
>>
>
> Ouch.  This is a known bug.  This fix is going to be hard.  I wrote
> about it here:
> http://archives.seul.org/libevent/users/Feb-2012/msg00053.html
>
> Does anybody want to take a crack at it?

Specifically, let me follow up with what I need: I need people with
good programming taste to read and understand that message, and let me
know whether you've got any good ideas for fixing it, or whether you
think my ideas are reasonable.  Any of my ideas would require some
tricky changes to the guarantees that event_del() provides for
multithreaded applications; I'm not sure there's one that doesn't.

I am not going to be able to think as well as I would like about this
bug this without some help... and if I am doing this on my own, I will
deliver a solution that will not be as good as it could have been. So:
anybody with a good taste in multithreading and API design able to
comment?

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