[zeromq-dev] Assertion failed in zmq::router_t::xsend (zeromq 4.1.1)

Abel Monroy Ferrero amonroy at grupobme.es
Thu Aug 6 12:17:28 CEST 2015

Hi all,

I've seen twice this core into an app we've made using zeromq (linux).
We have a ZMQ_ROUTER socket, and we are sending info through it.

But the zmq_assert into router::x_send failed and abort() is called

#0  0x0000003b77432625 in raise () from /lib64/libc.so.6
#1  0x0000003b77433e05 in abort () from /lib64/libc.so.6
#2  0x00007f0e1741c6a9 in zmq::zmq_abort (errmsg_=0x50e6 <Address 0x50e6 out of bounds>) at src/err.cpp:74
#3  0x00007f0e17430f26 in zmq::router_t::xsend (this=0xa2a500, msg_=0x7f0e1671db80) at src/router.cpp:183
#4  0x00007f0e1743593b in zmq::socket_base_t::send (this=0xa2a500, msg_=0x7f0e1671db80, flags_=2) at src/socket_base.cpp:801
#5  0x00007f0e1744a8da in s_sendmsg (s_=0xa2a500, msg_=0x7f0e1671db80, flags_=2) at src/zmq.cpp:336
#6  0x00007f0e1719f2b2 in s_send_string (dest=<value optimized out>, more=true,
    string=0x7f0e0c001378 "vt-service-manager-pubsub:9a88dde9-b6b4-451d-8fef-b048a329b446") at src/zstr.c:45
#7  0x000000000044e882 in Publisher::HandleSubscriptionMessage (this=0x7fff925c3920,
    string=0x7f0e00001110 "{\"_conn_status\":{\"_current_status\": \"DISCONNECTED\"...) at src/Publisher.cpp:64

src/router.cpp code is:
int zmq::router_t::xsend (msg_t *msg_)
    //  If this is the first part of the message it's the ID of the
    //  peer to send the message to.
    if (!more_out) {
        zmq_assert (!current_out);  <--- this is the assertion that provokes abort

We are trying to send the message using zstr_send function

        zstr_sendm(_router, itr->first.c_str());
        zstr_sendm(_router, MDPW_REPORT);
        zstr_send (_router, string);

It is working, but sometimes this assertion has failed, any ideas about it?


Abel Monroy Ferrero

Dpto. Desarrollo
Tramontana, 2 Edificio 2, Planta 2
28230 Las Rozas, Madrid - España
Tel.: +34 91 709 5746
amonroy at grupobme.es<mailto:amonroy at grupobme.es>

[cid:part2.09080502.08070601 at grupobme.es]

P Antes de imprimir, piensa en el MEDIO AMBIENTE
AVISO LEGAL/DISCLAIMER<http://www.bolsasymercados.es/disclaimer.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150806/a3854344/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: con_BME.jpg
Type: image/jpeg
Size: 107095 bytes
Desc: con_BME.jpg
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150806/a3854344/attachment.jpg>

More information about the zeromq-dev mailing list