[zeromq-dev] Mac OS X: test_shutdown_stress sometimes fails

Martin Sustrik sustrik at 250bpm.com
Mon Nov 1 22:10:33 CET 2010

> Backtrace in case the test does not terminate:
> #0  0x00007fff83e8adba in sendto ()
> #1  0x0000000100020dd7 in zmq::signaler_t::send (this=0x100100d70, cmd_=@0x7fff5fbfeee0) at ../../src/signaler.cpp:290
> #2  0x0000000100003fed in zmq::ctx_t::send_command (this=0x100100080, slot_=2, command_=@0x7fff5fbfeee0) at ../../src/ctx.cpp:221
> #3  0x0000000100011571 in zmq::object_t::send_command (this=0x100107290, cmd_=@0x7fff5fbfeee0) at ../../src/object.cpp:407
> #4  0x00000001000116d6 in zmq::object_t::send_activate_reader (this=0x100107290, destination_=0x100107b30) at ../../src/object.cpp:264
> #5  0x0000000100015f28 in zmq::writer_t::flush (this=0x100107290) at ../../src/pipe.cpp:270
> #6  0x0000000100016266 in zmq::writer_t::terminate (this=0x100107290) at ../../src/pipe.cpp:298
> #7  0x000000010002a7c3 in zmq::xrep_t::xattach_pipes (this=0x100101450, inpipe_=0x1001070d0, outpipe_=0x100107290, peer_identity_=@0x7fff5fbff180) at ../../src/xrep.cpp:65
> #8  0x0000000100022028 in zmq::socket_base_t::attach_pipes (this=0x100101450, inpipe_=0x1001070d0, outpipe_=0x100107290, peer_identity_=@0x7fff5fbff180) at ../../src/socket_base.cpp:180
> #9  0x0000000100022175 in zmq::socket_base_t::process_bind (this=0x100101450, in_pipe_=0x1001070d0, out_pipe_=0x100107290, peer_identity_=@0x7fff5fbff180) at ../../src/socket_base.cpp:677
> #10 0x00000001000121c9 in zmq::object_t::process_command (this=0x100101450, cmd_=@0x7fff5fbff1e0) at ../../src/object.cpp:92
> #11 0x0000000100021386 in zmq::socket_base_t::process_commands (this=0x100101450, block_=false, throttle_=false) at ../../src/socket_base.cpp:653
> #12 0x000000010002180f in zmq::socket_base_t::dezombify (this=0x100101450) at ../../src/socket_base.cpp:600
> #13 0x00000001000039ed in zmq::ctx_t::dezombify (this=0x100100080) at ../../src/ctx.cpp:318
> #14 0x0000000100003b0d in zmq::ctx_t::zombify_socket (this=0x100100080, socket_=0x100101450) at ../../src/ctx.cpp:209
> #15 0x0000000100011dcb in zmq::object_t::zombify_socket (this=0x100101450, socket_=0x100101450) at ../../src/object.cpp:152
> #16 0x0000000100021b30 in zmq::socket_base_t::close (this=0x100101450) at ../../src/socket_base.cpp:545
> #17 0x000000010002e0fa in zmq_close (s_=0x100101450) at ../../src/zmq.cpp:274
> #18 0x0000000100000d12 in main (argc=1, argv=0x7fff5fbff6a0) at ../../tests/test_shutdown_stress.cpp:75
This is caused by buffer of the socketpair used for communication 
between application and I/O threads is exhausted. Presumably, OSX has 
the default buffer size lower than Linux and thus the problem pops up. 
You can increase the buffer size by tweaking the value of 
signaler_sndbuf_size in src/config.hpp.

However, only real solution is using unlimited pipe for the 
communication. This is solved in 'signaler' branch. The implementation 
is suboptimal though and being worked on just now.


More information about the zeromq-dev mailing list