Closed
Description
I use libevent in Linux environment. I got dead lock in bufferevent_socket_connect. It seems that "bev" gets locked twice in bufferevent_socket_connect. The first lock is done by bufferevent_incref_and_lock_ and the second is done by bufferevent_getfd. I don't see the dead lock all the time. Just occasionally. I am wondering if it is proper to lock "bev" twice in bufferevent_socket_connect.
#0 0x0fd043a8 in __lll_lock_wait (futex=futex@entry=0xb50058d0, private=0) at lowlevellock.c:46
#1 0x0fcfa360 in __GI___pthread_mutex_lock (mutex=0xb50058d0) at ../nptl/pthread_mutex_lock.c:80
#2 0x0fd33da4 in evthread_posix_lock ()
#3 0x0fd6ff68 in bufferevent_getfd ()
#4 0x0fd7731c in bufferevent_socket_connect ()