[zeromq-dev] Crash from socket_monitor "Resource temporarily unavailable" when connection is closed due to crashed client

Auer, Jens jens.auer at cgi.com
Wed Sep 7 12:30:08 CEST 2016


Hi,

I just figured out that due to a wrong LD_LIBRARY_PATH setting I was not using ZeroMQ 4.1.5 but an older version 4.1.3. Have there been any fixes for the socket monitor in these two releases?

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<mailto:jens.auer at cgi.com>
Unsere Pflichtangaben gemäß § 35a GmbHG / §§ 161, 125a HGB finden Sie unter de.cgi.com/pflichtangaben<http://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 [zeromq-dev-bounces at lists.zeromq.org]" im Auftrag von "Auer, Jens [jens.auer at cgi.com]
Gesendet: Mittwoch, 7. September 2016 12:12
An: ZeroMQ development list
Betreff: [zeromq-dev] Crash from socket_monitor "Resource temporarily unavailable" when connection is closed due to crashed client

Hi,

I am using a socket_monitor to monitor socket states and generate logging messages for certain state transitions. I have seen spurious crashes which seem to be an internal error in the socket monitor. I have a core file available for one of the issues which crashed with an internal zmq_abort:
#0  0x00007f77278135f7 in raise () from /lib64/libc.so.6
#1  0x00007f7727814ce8 in abort () from /lib64/libc.so.6
#2  0x00007f77285f66b9 in zmq::zmq_abort (errmsg_=errmsg_ at entry=0x7f772795cf60 "Resource temporarily unavailable") at src/err.cpp:84
#3  0x00007f772860dde9 in zmq::signaler_t::recv (this=this at entry=0xeecd60) at src/signaler.cpp:282
#4  0x00007f77285f9e80 in zmq::mailbox_t::recv (this=this at entry=0xeecd00, cmd_=cmd_ at entry=0x7f7721058f40, timeout_=timeout_ at entry=0) at src/mailbox.cpp:87
#5  0x00007f772860ed39 in zmq::socket_base_t::process_commands (this=this at entry=0xeec940, timeout_=timeout_ at entry=0, throttle_=throttle_ at entry=true) at src/socket_base.cpp:1013
#6  0x00007f772860f05b in zmq::socket_base_t::send (this=this at entry=0xeec940, msg_=msg_ at entry=0x7f7721058ff0, flags_=flags_ at entry=2) at src/socket_base.cpp:798
#7  0x00007f772862487c in s_sendmsg (s_=0xeec940, msg_=0x7f7721058ff0, flags_=2) at src/zmq.cpp:346
#8  0x00007f772860f4b3 in zmq::socket_base_t::monitor_event (this=0xeeab00, event_=event_ at entry=512, value_=25, addr_="tcp://127.0.0.1:10098") at src/socket_base.cpp:1326
#9  0x00007f772860f63d in zmq::socket_base_t::event_disconnected (this=<optimized out>, addr_="tcp://127.0.0.1:10098", fd_=<optimized out>) at src/socket_base.cpp:1313
#10 0x00007f77286179da in zmq::stream_engine_t::error (this=this at entry=0x7f771c00dcc0, reason=reason at entry=zmq::stream_engine_t::connection_error) at src/stream_engine.cpp:936
#11 0x00007f7728618a6b in zmq::stream_engine_t::in_event (this=0x7f771c00dcc0) at src/stream_engine.cpp:300
#12 0x00007f77285f633e in zmq::epoll_t::loop (this=0xee95a0) at src/epoll.cpp:176
#13 0x00007f772861f560 in thread_routine (arg_=0xee9620) at src/thread.cpp:96
#14 0x00007f77283c7dc5 in start_thread () from /lib64/libpthread.so.0
#15 0x00007f77278d4ced in clone () from /lib64/libc.so.6

In this situation, the connected process connected to the monitored socket was itself crashing due an assertion error and thus the socket was closed. It does not happen every time, but is reproducible in a couple of minutes. I am using zeroMQ 4.1.5 patched with https://github.com/zeromq/libzmq/pull/1649.

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<mailto:jens.auer at cgi.com>
Unsere Pflichtangaben gemäß § 35a GmbHG / §§ 161, 125a HGB finden Sie unter de.cgi.com/pflichtangaben<http://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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160907/a3b4954b/attachment.htm>


More information about the zeromq-dev mailing list