Hi Michi, I was going to suggest the same thing. Trace which sockets are being opened / closed, it should point to the problem.
Good luck, -- Gonzalo Diethelm DCV Chile From: [email protected] [mailto:[email protected]] On Behalf Of Andrew Hume Sent: Tuesday, April 01, 2014 10:29 AM To: ZeroMQ development list Subject: Re: [zeromq-dev] zmq_ctx_term hang it ain't pretty, but i have always been able to resolve these by adding simple debugging printf lines at socket open and close. On Apr 1, 2014, at 6:24 AM, Pieter Hintjens <[email protected]<mailto:[email protected]>> wrote: There's no way to see what's hanging. This is still a poorly built part of libzmq. The best way to debug this is to make a test case and strip that down until it works. On Tue, Apr 1, 2014 at 2:59 PM, Michi Henning <[email protected]<mailto:[email protected]>> wrote: Hi, I'm looking for some advice on how to debug a hang in zmq_ctx_term(). Basically, I have a number of sockets in use in my program. They all set the linger timeout to zero (or a small wait time, on the order of 300 ms). When I finally shutdown (via the zmqpp::context destructor), I end up hanging in zmq_ctx_term(). This doesn't happen deterministically--I get the hang once in about twenty tries or so. When the hang occurs, all my threads have terminated, and the only threads remaining are the main thread, plus two internal threads created by zmq. I know that terminating requires all sockets to be closed, and I believe that I'm actually closing them properly. My question is whether there is any way to figure out *why* zmq_ctx_term() waits indefinitely. Is there a way to see what exactly zmq_ctx_term() is waiting for? Thanks, Michi. _______________________________________________ zeromq-dev mailing list [email protected]<mailto:[email protected]> http://lists.zeromq.org/mailman/listinfo/zeromq-dev _______________________________________________ zeromq-dev mailing list [email protected]<mailto:[email protected]> http://lists.zeromq.org/mailman/listinfo/zeromq-dev ----------------------- Andrew Hume 949-707-1964 (VO and best) 732-420-0907 (NJ) [email protected]<mailto:[email protected]> ----------------------------------------- Declaración de confidencialidad: Este Mensaje esta destinado para el uso de la o las personas o entidades a quien ha sido dirigido y puede contener información reservada y confidencial que no puede ser divulgada, difundida, ni aprovechada en forma alguna. El uso no autorizado de la información contenida en este correo podrá ser sancionado de conformidad con la ley chilena. Si usted ha recibido este correo electrónico por error, le pedimos eliminarlo junto con los archivos adjuntos y avisar inmediatamente al remitente, respondiendo este mensaje. "Before printing this e-mail think if is really necesary". Disclosure: This Message is to be used by the individual, individuals or entities that it is addressed to and may include private and confidential information that may not be disclosed, made public nor used in any way at all. Unauthorized use of the information in this electronic mail message may be subject to the penalties set forth by Chilean law. If you have received this electronic mail message in error, we ask you to destroy the message and its attached file(s) and to immediately notify the sender by answering this message.
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
