You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anyway it is hard to say something based on provided samples. But you can try to compile with TSan at least, and see what it will report about deadlocks. Also if you have threads, please make that you enabled pthread support (evthread_use_pthreads())
@legale I suggest you don't reuse the ac->events.mqtt_loop.ev. use event_new, then use event_free, avoid use event_del and event_assign.
You add an event for EV_READ and EV_WRITE, and select in the callback. Please note, most of the time, the sock can be writable, so the callback would be called, then I see you do a select in the callback.
And I suggest you use different events like ev_write and ev_read, then disable ev_write if there is nothing to write. Otherwise, you use the same event for both ev_read and ev_write, you need do select in the callback, then why do you use libevent? (That's the way of bufferevent_socket.) If the underlying socket is udp, you can use other magic way.
aarch64 system kernel 5.4.164
libevent2 master fc9bfd2
I got flickering bug with deadlock on event_del_nolock_()
bt:
stuck on the libmosquito loop event EV_PERSIST callback.
This is callback
This is init function
The text was updated successfully, but these errors were encountered: