zeromq module thread safety
Alex Massover
alex at jajah.com
Thu Aug 16 18:30:06 CEST 2012
Hello,
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?
--
Best Regards,
Alex Massover
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20120816/8b7fed3b/attachment.html>
More information about the Freeradius-Devel
mailing list