[Freeswitch-users] mod_event_zmq thread safety

João Mesquita jmesquita at freeswitch.org
Thu Aug 16 23:27:02 MSD 2012


I do *think* that events are dispatched by different workers on the core
indeed which might be the cause of your problem. ZMQ also has a few asserts
on the core that can be quite disruptive and they were working on getting
it working more properly. Dunno what's the status of that right now.

A core dump would help a lot on any case tho.

João Mesquita



On Thu, Aug 16, 2012 at 4:23 PM, Alex Massover <alex at jajah.com> wrote:

> 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
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120816/7677a818/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list