[zeromq-dev] Test case for the "Assertion failed: nbytes == sizeof (command_t)" error.

Luc Heinrich luc at honk-honk.com
Sun Jun 12 18:53:38 CEST 2011


On 12 juin 2011, at 15:28, Pieter Hintjens wrote:

> Can you get a debug backtrace?

Sure. 

The assertion occurs in an IO thread, here's the stack:

#0  0x00007fff86fc7e4e in __semwait_signal_nocancel ()
#1  0x00007fff86fc7d50 in nanosleep$NOCANCEL ()
#2  0x00007fff870246ae in usleep$NOCANCEL ()
#3  0x00007fff87043ce0 in abort ()
#4  0x0000000100011fc4 in zmq::mailbox_t::send (this=0x1003005d0, cmd_=@0x10047eb10) at mailbox.cpp:194
#5  0x00000001000049a9 in zmq::ctx_t::send_command (this=0x100100080, tid_=4, command_=@0x10047eb10) at ctx.cpp:223
#6  0x00000001000134bd in zmq::object_t::send_command (this=0x101809870, cmd_=@0x10047eb10) at object.cpp:465
#7  0x00000001000135ba in zmq::object_t::send_pipe_term (this=0x101809870, destination_=0x1018098d0) at object.cpp:302
#8  0x00000001000194f1 in zmq::reader_t::terminate (this=0x101809870) at pipe.cpp:141
#9  0x00000001000196cf in zmq::reader_t::read (this=0x101809870, msg_=0x101808700) at pipe.cpp:120
#10 0x0000000100021b03 in zmq::session_t::read (this=0x101809290, msg_=0x101808700) at session.cpp:88
#11 0x000000010000c802 in zmq::encoder_t::message_ready (this=0x1018086b8) at encoder.cpp:62
#12 0x0000000100032ba5 in zmq::encoder_base_t<zmq::encoder_t>::get_data (this=0x1018086b8, data_=0x1018086a8, size_=0x1018086b0, offset_=0x0) at encoder.hpp:80
#13 0x0000000100031ac8 in zmq::zmq_engine_t::out_event (this=0x101808600) at zmq_engine.cpp:165
#14 0x0000000100031a6b in zmq::zmq_engine_t::activate_out (this=0x101808600) at zmq_engine.cpp:203
#15 0x0000000100021285 in zmq::session_t::activated (this=0x101809290, pipe_=0x101809870) at session.cpp:198
#16 0x0000000100017e38 in zmq::reader_t::process_activate_reader (this=0x101809870) at pipe.cpp:148
#17 0x0000000100014148 in zmq::object_t::process_command (this=0x101809870, cmd_=@0x10047edf0) at object.cpp:63
#18 0x000000010000ecd9 in zmq::io_thread_t::in_event (this=0x100300000) at io_thread.cpp:83
#19 0x0000000100010173 in zmq::kqueue_t::loop (this=0x100300040) at kqueue.cpp:176
#20 0x000000010001021d in zmq::kqueue_t::worker_routine (arg_=0x100300040) at kqueue.cpp:189
#21 0x0000000100029a93 in thread_routine (arg_=0x1003000b0) at thread.cpp:73
#22 0x00007fff86f8e4f6 in _pthread_start ()
#23 0x00007fff86f8e3a9 in thread_start ()

And the value of nbytes here (at frame #4) is 32 and since sizeof(command_t) is 48 it goes boom.

-- 
Luc Heinrich - luc at honk-honk.com




More information about the zeromq-dev mailing list