[zeromq-dev] Zmq Assert

Chuck Remes lists at chuckremes.com
Thu Apr 12 18:10:26 CEST 2012


On Apr 12, 2012, at 10:45 AM, Antonio Teixeira wrote:

> Hello Friends.
> 
> I have hitting a wall since i updated to the latest of ZMQ and PyZmq
> 
> Assertion failed: ok (mailbox.cpp:84)
> 
> I have tried everything i can remember , probably this is a problem in Zmq and not PyZmq but i wanted to get the opinion of a more experience member
> of the community first.
> 
> Scenario :
> 
> Parent thread forks a child
> both run the exact same code a exception happens in the parent that terminates but the child survives.
> 
> This is a simple PUB / SUB where the PUB does connect and the SUB binds.
> The side that crashes is the Publisher.

Make sure you do *not* share the same context between forked processes. It's simplest to create the context(s) after you have done all of your forking. Try that and see if it solves your issue.

If you don't mean "fork" (as in creating a new process) but instead mean to say you are creating a new thread under the same process, then you should verify that you are not accessing any socket from more than one thread. 0mq sockets are not thread safe.

cr




More information about the zeromq-dev mailing list