[zeromq-dev] Assertion failure in mailbox.cpp

Jon Gjengset jon at thesquareplanet.com
Tue May 27 11:55:57 CEST 2014

> I take it you mean this one?
> http://lists.zeromq.org/pipermail/zeromq-dev/2014-March/025705.html
> I notice that the patch is for 3.2. Do you have it working on 4.x?
> Also, could you please regenerate the patch using "diff -u" or "git
> diff" so that it is clearer exactly what has changed?

I took the liberty of adapting this to merge cleanly against 4.0.4 (also
works agains dev master). The modified patch is attached in unified
format; tests are still in the tarball linked to in the original post.
It seems to solve the mailbox.cpp assertion, but

	Assertion failed: dummy == 1 (signaler.cpp:232)

is still occasionally present on close in my application.

I'm not sure the patch is complete as it stands because it removes a
return value check in send(), unlocks after signaler.send(), and has an
infinite loop in recv(), but it might give a hint as to what the
underlying problem is. I suspect the core of the fix lies in wrapping
cpipe.read() in a lock, but that seems like a "if all you have is a
hammer" kind of solution..

If someone with more intimate knowledge of the code could take a look,
that would be much appreciated.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zeromq-mailbox-cpp-82-assertion.patch
Type: text/x-diff
Size: 3035 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140527/2bfdef25/attachment.patch>

More information about the zeromq-dev mailing list