[zeromq-dev] Zmq Assert
William Brown
william.brown at ericsson.com
Thu Apr 12 19:23:13 CEST 2012
I had this exact same problem with 2.11. Turned out to be because a single socket was inadvertently
being shared across multiple threads.
--Corey
________________________________
From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Antonio Teixeira
Sent: Thursday, April 12, 2012 12:21 PM
To: ZeroMQ development list
Subject: Re: [zeromq-dev] Zmq Assert
Checked :)
Fork = New Process
And there are no shared contexts / sockets or anything.
2012/4/12 Chuck Remes <lists at chuckremes.com<mailto:lists at chuckremes.com>>
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
_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org<mailto:zeromq-dev at lists.zeromq.org>
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120412/a80f315b/attachment.htm>
More information about the zeromq-dev
mailing list