[zeromq-dev] Subtle zmq_poll bug #1

Martin Sustrik sustrik at 250bpm.com
Mon Mar 15 09:00:03 CET 2010


Brian,

> I am beginning to go through the process of testing zmq_poll in various ways...
> 
> When I run:
> 
> http://gist.github.com/332237
> 
> I get:
> 
> $ python p2p.py
> Traceback (most recent call last):
>   File "p2p.py", line 23, in <module>
>     assert socks[s1] == zmq.POLLOUT
> AssertionError
> Bad file descriptor
> rc != -1 (kqueue.cpp:79)
> 
> There are two issues here:
> 
> 1. This P2P socket (it is a bound socket) does not come up in the
> POLLOUT state.  The other socket (the one that connects) does come up
> in the POLLOUT state.

Yes. P2P is not completely polished yet. On the binding side of the 
connection the availability for writing is not immediate. I'll try to 
fix it asap, however, I am not sure whether it get into this week's 
release (2.0-beta3).

> 2. The additional "Bad file descriptor" shows up only some of the time.

This one - or a very similar one - was already reported on QNX by Armin 
Steinhoff. Isn't there accidentally a tool similar to strace on OSX? If 
so, can you strace the problem? (Unfortunately, no OSX here.)

Martin



More information about the zeromq-dev mailing list