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

[Libevent-users] Issue in using bufferevent in multithreaded code




Hi,

I am facing some issues while using bufferevent over OpenSSL in multithreaded application.

I am using bufferevents to communicate over a SSL connection. In my application one thread is the
main listener and data reading thread and set of other worker threads. While main thread is
reading all the data for all the SSL connections, diferent worker pool threads can write to the underlying
bufferevents associated with main thread's base event and event loop.

I am frequently getting followign error
[event_queue_remove: 0x7fb3ec0037e8(fd 21) not on queue 8]
[evmap.c:372: Assertion nwrite >= 0 failed in evmap_io_del]
I have already enabled the thread-safety features of  libevent and openssl. 
Can someone please take a look in this issue.

--
"When it rains, all birds occupy shelter but Eagle avoids rain by flying above the cloud.
Problem is common to all but attitude makes difference."

Thanks & Regards
Ashish Bhawsar