Assertion failed: ok (mailbox.cpp:84)


Not sure if this bug is in ZMQ, because it's hard to reproduce (I have tried and did not succeed: tried even on the same program and same machine, with program's other work cut off, just with requests and related logic left), but decided to write a report anyway.
My program crashes approximately once in a week with that failed assertion, without any reason that I can see. I have suspected that it is somehow related to inproc sockets (the program uses inproc- and TCP-sockets, only REQ-REP (with router, dealer and proxy sometimes) after initialization), but last crash occured definely on inproc socket. Here is partial backtraces of two crashes:

Last one, definely with inproc:

#0 0xb7e2dc66 in raise () from /lib/
#1 0xb7e2f571 in abort () from /lib/
#2 0xb7c553b8 in zmq::zmq_abort (errmsg_=0xb7c7f442 "ok") at err.cpp:76
#3 0xb7c59908 in zmq::mailbox_t::recv (this=0xb09ae5a0, cmd_=0xb1ad9ea8, timeout_=0) at mailbox.cpp:84
#4 0xb7c688fd in zmq::socket_base_t:rocess_commands (this=0xb09ae3a0, timeout_=0, throttle_=true) at socket_base.cpp:824
#5 0xb7c68d87 in zmq::socket_base_t::send (this=0xb09ae3a0, msg_=0xb1ad9f6c, flags_=0) at socket_base.cpp:644
#6 0xb7c7de13 in s_sendmsg (s_=0xb09ae3a0, msg_=0xb1ad9f6c, flags_=0) at zmq.cpp:337

Another one, starting from another function, but most likely inproc too:

#0 0xb7e2dc66 in raise () from /lib/
#1 0xb7e2f571 in abort () from /lib/
#2 0xb7c563b8 in zmq::zmq_abort (errmsg_=0xb7c80442 "ok") at err.cpp:76
#3 0xb7c5a908 in zmq::mailbox_t::recv (this=0xae1b2ed8, cmd_=0xb02b9fb8, timeout_=-1) at mailbox.cpp:84
#4 0xb7c698fd in zmq::socket_base_t:rocess_commands (this=0xae1b2cd8, timeout_=-1, throttle_=false) at socket_base.cpp:824
#5 0xb7c69c9e in zmq::socket_base_t::recv (this=0xae1b2cd8, msg_=0xb02ba06c, flags_=<optimized out>) at socket_base.cpp:758
#6 0xb7c7ed1c in s_recvmsg (s_=0x0, msg_=0xb02ba06c, flags_=16740) at zmq.cpp:419

P.S. There is no shared sockets between threads, and the way from actual program to ZMQ is Perl 5.8.8 -> binding via SWIG -> C library -> ZMQ.


32-bit Slackware 12.1.0 Linux;
GCC 4.2.3, GNU C Library stable release version 2.7


yison lu
November 20, 2013, 7:28 AM

I also met this issue. When will you fix this bug?






Affects versions