[zeromq-dev] zmsg_send blocked
Yauheni Baltouski
ybaltouski at gmail.com
Thu Jul 25 23:15:00 CEST 2013
Hi,
I'm using czmq for building small router application, so I'm using
ROUTER-ROUTER
connection for dynamic connection and send/recv mesages over it.
All looks like working fine (as it possible for R-to-R case :), but I'm in
stuck
with sending message when peer disconnected (it is expected behavior).
So I want to continue processing, but zmsg_send is blocked with such
backtrace:
#0 0xb7fdd424 in __kernel_vsyscall ()
#1 0xb7e89690 in __GI___poll (fds=0xbfffee18, nfds=1, timeout=-1) at
../sysdeps/unix/sysv/linux/poll.c:87
#2 0xb7f9b618 in zmq::signaler_t::wait (this=0x80529d0, timeout_=-1) at
signaler.cpp:145
#3 0xb7f8f7e8 in zmq::mailbox_t::recv (this=0x80529a0, cmd_=0xbfffeeb0,
timeout_=-1) at mailbox.cpp:69
#4 0xb7f9c85d in zmq::socket_base_t::process_commands (this=0x80527b8,
timeout_=-1, throttle_=false)
at socket_base.cpp:823
#5 0xb7f9cab0 in zmq::socket_base_t::send (this=0x80527b8, msg_=0x8077998,
flags_=2) at socket_base.cpp:648
#6 0xb7fae380 in s_sendmsg (s_=0x80527b8, msg_=0x8077998, flags_=2) at
zmq.cpp:337
#7 0xb7fae44b in zmq_sendmsg (s_=0x80527b8, msg_=0x8077998, flags_=2) at
zmq.cpp:346
#8 0xb7f5af50 in zframe_send (self_p=0xbffff00c, zocket=0x80527b8,
flags=1) at zframe.c:211
#9 0xb7f5f6fe in zmsg_send (self_p=0xbffff048, zocket=0x80527b8) at
zmsg.c:133
#10 0x0804a9e5 in getModuleList_event_item (key=0x805ce80 "605dd619",
item=0x805e3d8, arg=0x8050038)
at modrouter.c:193
#11 0xb7f5c8ab in zhash_foreach (self=0x8050048, callback=0x804a780
<getModuleList_event_item>,
argument=0x8050038) at zhash.c:446
#12 0x0804aad5 in getModuleList_event (loop=0x805c398, item=0x0,
arg=0x8050038) at modrouter.c:215
#13 0xb7f5eecd in zloop_start (self=0x805c398) at zloop.c:370
#14 0x0804bc5c in main (argc=2, argv=0xbffff2c4) at modrouter.c:578
Can somebody tells me what's wrong and how to avoid it? May be I should use
ZMQ_DONTWAIT flag, but it not implemented in CZMQ.
I want to send message independ of peer state, if it dead it should be just
dropped.
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130726/fbae8b9b/attachment.htm>
More information about the zeromq-dev
mailing list