[zeromq-dev] Assertion failure in libzm msg.cpp:296 when reading from ZMQ_STREAM socket

Pieter Hintjens ph at imatix.com
Thu Nov 19 13:04:50 CET 2015


OK, I've backported Doron's fix to zeromq4-1 and will make a release next week.

On Thu, Nov 19, 2015 at 1:24 PM, Auer, Jens <jens.auer at cgi.com> wrote:
> Hi Pieter,
>
> I have opened issue 1644 (https://github.com/zeromq/libzmq/issues/1644).
>
> Thanks,
>   Jens
>
> --
> Dr. Jens Auer | CGI | Software Engineer
> CGI Deutschland Ltd. & Co. KG
> Rheinstraße 95 | 64295 Darmstadt | Germany
> T: +49 6151 36860 154
> jens.auer at cgi.com
> Unsere Pflichtangaben gemäß § 35a GmbHG / §§ 161, 125a HGB finden Sie unter de.cgi.com/pflichtangaben.
>
> CONFIDENTIALITY NOTICE: Proprietary/Confidential information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply e-mail.
>
>> -----Original Message-----
>> From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-
>> bounces at lists.zeromq.org] On Behalf Of Pieter Hintjens
>> Sent: 19 November 2015 07:11
>> To: ZeroMQ development list
>> Subject: Re: [zeromq-dev] Assertion failure in libzm msg.cpp:296 when reading
>> from ZMQ_STREAM socket
>>
>> From reading the code: the library is setting the metadata on the message a second
>> time if the message is pushed to the session twice (retry). This situation isn't
>> expected by the metadata class, which asserts. It specifically affects raw (stream)
>> sockets.
>>
>> Doron, would you send this patch to libzmq master? And thanks so much for it... :)
>>
>> Jens, could you raise an issue? Then we can backport this fix to 4.1 stable and make
>> a new release.
>>
>> Thanks
>> Pieter
>>
>> On Wed, Nov 18, 2015 at 5:53 PM, Auer, Jens <jens.auer at cgi.com> wrote:
>> > Hi Doron,
>> >
>> > this fixes the issue. I am curious when this condition is triggered.
>> > Does it just mean that the metadata is set twice?
>> >
>> > Cheers,
>> >   Jens
>> >
>> > --
>> > Jens Auer | CGI | Software-Engineer
>> > CGI (Germany) GmbH & Co. KG
>> > Rheinstraße 95 | 64295 Darmstadt | Germany
>> > T: +49 6151 36860 154
>> > jens.auer at cgi.com
>> > Unsere Pflichtangaben gemäß § 35a GmbHG / §§ 161, 125a HGB finden Sie
>> > unter de.cgi.com/pflichtangaben.
>> >
>> > CONFIDENTIALITY NOTICE: Proprietary/Confidential information belonging
>> > to CGI Group Inc. and its affiliates may be contained in this message.
>> > If you are not a recipient indicated or intended in this message (or
>> > responsible for delivery of this message to such person), or you think
>> > for any reason that this message may have been addressed to you in
>> > error, you may not use or copy or deliver this message to anyone else.
>> > In such case, you should destroy this message and are asked to notify the sender
>> by reply e-mail.
>> > ________________________________
>> > Von: zeromq-dev-bounces at lists.zeromq.org
>> > [zeromq-dev-bounces at lists.zeromq.org]" im Auftrag von "Doron Somech
>> > [somdoron at gmail.com]
>> > Gesendet: Mittwoch, 18. November 2015 14:06
>> >
>> > An: ZeroMQ development list
>> > Betreff: Re: [zeromq-dev] Assertion failure in libzm msg.cpp:296 when
>> > reading from ZMQ_STREAM socket
>> >
>> > The problem is that the stream engine try to set metadata which
>> > already set before.
>> >
>> > Can you check the following fix:
>> >
>> > https://github.com/somdoron/libzmq/commit/210572201d2b7c7ab249ce2741ad
>> > 69b287d2d28b
>> >
>> >
>> >
>> > On Wed, Nov 18, 2015 at 11:29 AM, Auer, Jens <jens.auer at cgi.com> wrote:
>> >>
>> >> Hi Pieter,
>> >>
>> >> we are using zeroMQ 4.1.3. I managed to reproduce it on the current
>> >> master
>> >> branch:
>> >> #0  0x00007f8ff2c185d7 in raise () from /lib64/libc.so.6
>> >> #1  0x00007f8ff2c19cc8 in abort () from /lib64/libc.so.6
>> >> #2  0x00007f8ff2c11546 in __assert_fail_base () from /lib64/libc.so.6
>> >> #3  0x00007f8ff2c115f2 in __assert_fail () from /lib64/libc.so.6
>> >> #4  0x00007f8ff3a07bb9 in zmq::msg_t::set_metadata
>> >> (this=this at entry=0x7f8fec06c668, metadata_=0x7f8fec06ec10) at
>> >> src/msg.cpp:390
>> >> #5  0x00007f8ff3a25040 in
>> >> zmq::stream_engine_t::push_raw_msg_to_session
>> >> (this=0x7f8fec06c730, msg_=0x7f8fec06c668) at
>> >> src/stream_engine.cpp:873
>> >> #6  0x00007f8ff3a25435 in zmq::stream_engine_t::restart_input
>> >> (this=0x7f8fec06c730) at src/stream_engine.cpp:456
>> >> #7  0x00007f8ff3a190c2 in zmq::session_base_t::write_activated
>> >> (this=0x16c0c50, pipe_=0x16c90f0) at src/session_base.cpp:284
>> >> #8  0x00007f8ff3a00eb4 in zmq::io_thread_t::in_event (this=0x16a2eb0)
>> >> at
>> >> src/io_thread.cpp:84
>> >> #9  0x00007f8ff39ffcde in zmq::epoll_t::loop (this=0x16a17c0) at
>> >> src/epoll.cpp:178
>> >> #10 0x00007f8ff3a2d550 in thread_routine (arg_=0x16a1840) at
>> >> src/thread.cpp:96
>> >> #11 0x00007f8ff37cadf5 in start_thread () from /lib64/libpthread.so.0
>> >> #12 0x00007f8ff2cd91ad in clone () from /lib64/libc.so.6
>> >>
>> >> We are sending ~24MB/s from a ZMQ_STREAM socket in one process to a
>> >> ZMQ_STREAM socket in the process where it crashes. The generator is a
>> >> test tool generating in packets of ~1kb and then streamed to simulate
>> >> a protocol which we have to implement. The crashing application is
>> >> our main application which connected to the test tool, receives data
>> >> and extracts packets from the stream to distribute it on a PUB
>> >> socket. I will try with a minimal example when I have time, but currently we
>> have to meet a deadline.
>> >>
>> >> Should I open an issue in the issue tracker?
>> >>
>> >> Best wishes,
>> >>   Jens
>> >>
>> >> --
>> >> Jens Auer | CGI | Software-Engineer
>> >> CGI (Germany) GmbH & Co. KG
>> >> Rheinstraße 95 | 64295 Darmstadt | Germany
>> >> T: +49 6151 36860 154
>> >> jens.auer at cgi.com
>> >> Unsere Pflichtangaben gemäß § 35a GmbHG / §§ 161, 125a HGB finden Sie
>> >> unter de.cgi.com/pflichtangaben.
>> >>
>> >> CONFIDENTIALITY NOTICE: Proprietary/Confidential information
>> >> belonging to CGI Group Inc. and its affiliates may be contained in
>> >> this message. If you are not a recipient indicated or intended in
>> >> this message (or responsible for delivery of this message to such
>> >> person), or you think for any reason that this message may have been
>> >> addressed to you in error, you may not use or copy or deliver this
>> >> message to anyone else. In such case, you should destroy this message and are
>> asked to notify the sender by reply e-mail.
>> >>
>> >> ________________________________________
>> >> Von: zeromq-dev-bounces at lists.zeromq.org
>> >> [zeromq-dev-bounces at lists.zeromq.org]" im Auftrag von
>> >> "Pieter Hintjens [ph at imatix.com]
>> >> Gesendet: Dienstag, 17. November 2015 15:29
>> >> An: ZeroMQ development list
>> >> Betreff: Re: [zeromq-dev] Assertion failure in libzm msg.cpp:296 when
>> >> reading from ZMQ_STREAM socket
>> >>
>> >> I don't see the assertion failure in msg.cpp:296...
>> >> _______________________________________________
>> >> zeromq-dev mailing list
>> >> zeromq-dev at lists.zeromq.org
>> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> >> _______________________________________________
>> >> zeromq-dev mailing list
>> >> zeromq-dev at lists.zeromq.org
>> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> >
>> >
>> >
>> > _______________________________________________
>> > zeromq-dev mailing list
>> > zeromq-dev at lists.zeromq.org
>> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> >
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev



More information about the zeromq-dev mailing list