[zeromq-dev] rc == 0 (./zmq/mutex.hpp:94)

Aamir M aamirjvm at gmail.com
Mon Jul 13 20:57:55 CEST 2009


Hi Martin & Martin,

I've come up with some stand-alone code that I think reproduces the
mutex error I was describing (please see attached C++ code). If you
compile and run this code (requires Linux, 0MQ 1.0.0), you should
eventually see this output:

go
Invalid argument (./zmq/mutex.hpp:97)
Invalid argument (./zmq/mutex.hpp:97)
Aborted

The offending line of code appears to be zmq_mutex_error.cpp:50:

zmq::message_t msg_out( 64 );

If I comment out this line and instead uncomment line 45 (which simply
moves the declaration of msg_out to outside of the while loop) then
the mutex error does not occur. I'm a little hazy on why this is
happening and what the proper 0MQ library usage should be in this
case.

Thanks,
Aamir



On Mon, Jul 13, 2009 at 11:34 AM, Martin Sustrik<sustrik at fastmq.com> wrote:
> Martin Hurton wrote:
>>
>> Hi Aamir,
>>
>> Please apply the attached patch to 0.6.1 tree and let us know what's
>> printed when the assertion fails.
>
> Actually, I've applied similar patch to v1.0.0, so you may alternatively use
> version 1.0.0 instead of 0.6.1.
>
> Martin
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zmq_mutex_error.cpp
Type: application/octet-stream
Size: 1966 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090713/a21b5987/attachment.obj>


More information about the zeromq-dev mailing list