[zeromq-dev] Subtle zmq_poll bug #1

Brian Granger ellisonbg at gmail.com
Sun Mar 14 22:02:45 CET 2010


I am beginning to go through the process of testing zmq_poll in various ways...

When I run:


I get:

$ python p2p.py
Traceback (most recent call last):
  File "p2p.py", line 23, in <module>
    assert socks[s1] == zmq.POLLOUT
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.

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

Adding a long time.sleep() before calling poll makes both of these
issues go away.



Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu
ellisonbg at gmail.com

More information about the zeromq-dev mailing list