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.<div>
<br></div><div>A core dump would help a lot on any case tho.</div><div><br clear="all">João Mesquita<br><br>
<br><br><div class="gmail_quote">On Thu, Aug 16, 2012 at 4:23 PM, Alex Massover <span dir="ltr"><<a href="mailto:alex@jajah.com" target="_blank">alex@jajah.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
We're using mod_event_zmq module (slightly modified, we use different socket type and IPC instead of TCP), and experience crashes.<br>
<br>
As far as I understood the module it creates ZMQ context and all event sent by using same context.<br>
<br>
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.<br>
<br>
ZMQ guide strongly prohibits doing that: " You MUST NOT share ØMQ sockets between threads."<br>
<br>
And when I do a mutex around send() there're no more crashes (at least today).<br>
<br>
Am I missing something or mod_event_zmq is potentially dangerous?<br>
<br>
--<br>
Best Regards,<br>
Alex Massover<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div>