[zeromq-dev] Client blocked in recv() until I kill sender...

Marc Rossi mrossi19 at gmail.com
Thu Nov 4 16:00:42 CET 2010

Ok, this is a continuation of a problem I posted to the group a while back.
 I know there are a few things that I need to dig into as suggested by
Martin, but thought this was somewhat interesting.

Quick recap:  Client program using ZMQ_SUB over TCP will hang once or twice
a day and need to be restarted.  Symptoms of the hang are the io_thread
continues pulling data off the socket and placing it on the internal queue,
but my main thread which is calling socket:_t::recv() never returns from
that call.   netstat shows nothing in the recv q as the io thread continues
to pull data from the socket and queue for reading.  Problem seems to occur
when things get busy and there is more traffic being sent across the PUB/SUB

Noticed yesterday that killing the publisher unblocks the subscriber which
then proceeds to process all the stale data in its internal queue that was
pulled off the socket.

Any thoughts?  Not sure why killing the publisher frees a blocked subcriber
(PUB/SUB over TCP with no HWM set) on a remote machine.

Using zeromq 2.0.9 on Linux x86_64 boxes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101104/a1b6d761/attachment.htm>

More information about the zeromq-dev mailing list