[zeromq-dev] possible ZeroMQ bugs

Shannon -jj Behrens jjinux at gmail.com
Tue Jan 11 02:48:15 CET 2011


I think I may have found a few bugs, although I have a suspicion they
may have been covered before.  Hopefully there's I can point out at
least one a couple new ones, though ;)

My sample code is here: http://pastebin.com/4FC89sNc

1. In the code, if you replace tcp://127.0.0.1:7676 with
http://127.0.0.1:7676 (i.e. if your fingers accidentally type "http"
instead of "tcp"), you don't get an error.

2. In the code, if you replace tcp://127.0.0.1:7676 with
tcp://localhost:7676, it says "No such device" which is kind of a
mysterious error.  "Hostnames are not allowed" might be better when
you're dealing with tcp://.

3. If you run the code as is, it'll hang forever in context.term().  I
think it has to do with the fact that I have two threads.  However,
the code is very simple, and by the type context.term() is run, one
thread has joined with the other.  I don't see any reason why the code
should hang.  By the way, it hangs hard--you have to kill -9 it.

4. In general, the code doesn't respond well to keyboard interrupts.
For instance, even if you comment out all the lines that start with
thread in my code sample, hitting Cntl-C doesn't really do the right
thing.  I've seen it fail in 3 different ways, but I've never seen it
raise a KeyboardInterrupt and exit the program.  I'm just going to
take a guess and say that it may be necessary to mark ZeroMQ's thread
as a daemon thread, but I haven't looked at the code.

If you need me to file these anywhere, I'm happy to do that.

Versions:
Linux jjinux 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 2 02:41:37 UTC
2010 x86_64 GNU/Linux
zeromq-2.1.0
pyzmq-2.1.0dev

Thanks,
-jj

-- 
In this life we cannot do great things. We can only do small things
with great love. -- Mother Teresa
http://jjinux.blogspot.com/



More information about the zeromq-dev mailing list