[zeromq-dev] is this a linux bug?

Andrew Hume andrew at research.att.com
Mon Jan 10 17:37:52 CET 2011

so normally if that is the issue, netstat would report
the connection in TIME_WAIT.
however, it reports the link as ESTABLISHED
(with both ends within process b). so it will never go away on its own.

is it possible that zmq has started up some thread that holds that connection?

On Jan 10, 2011, at 9:28 AM, Martin Sustrik wrote:

> Andrew,
>> one of the things i like about zeromq is that you don't
>> have to be fussy about the order of starting things up.
>> for example,
>> proc a:
>> sock = zmq_socket(ctxt, ZMQ_PUB)
>> zmq_bind(sock, "tcp://*.34567")
>> and proc b:
>> sock = zmq_socket(ctxt, ZMQ_SUB)
>> zmq_connect(sock, "tcp://myhost.34567")
>> works just fine, no matter the order they start in.
>> (they're both running on the same host.)
>> however, if proc a dies, and we start another one,
>> it can't, becaus ethe bind fails because of "Address already in use".
>> (i observe that if we have run proc b on another host,
>> we never get this error.)
>> is this a zmq issue, or yet another case where linux is screwing us?
> IIRC, if the process bound to a particular port dies, it takes kernel 
> some time to make the port usable again.
> I am not a really a Linux internals expert though.
> Martin
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Andrew Hume  (best -> Telework) +1 623-551-2845
andrew at research.att.com  (Work) +1 none currently
AT&T Labs - Research; member of USENIX and LOPSA

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110110/a5228f2e/attachment.htm>

More information about the zeromq-dev mailing list