zeromq module thread safety
alex at jajah.com
Thu Aug 16 18:30:06 CEST 2012
We're using mod_event_zmq module (slightly modified, we use different socket type and IPC instead of TCP), and experience crashes.
As far as I understood the module it creates ZMQ context and all event sent by using same context.
Events callback is called from different threads, isn't it? And can be a situation when different threads access send() api on this context simultaneously.
ZMQ guide strongly prohibits doing that: " You MUST NOT share ØMQ sockets between threads."
And when I do a mutex around send() there're no more crashes (at least today).
Am I missing something or mod_event_zmq is potentially dangerous?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Freeradius-Devel