[zeromq-dev] Bad File Descriptor / nbytes != -1 error (mailbox.cpp:241)

Andrew Cholakian andrew at andrewvc.com
Thu Feb 10 18:08:29 CET 2011


I've got an (unfortunately) reproducible error that's been triggering on an
app of mine. I briefly spoke about it in IRC yesterday, but I think I may
have an strace log that indicates the error. I just tried it again this
morning with ZMQ HEAD, no luck.

The most interesting part is excerpted here:
https://gist.github.com/820779

Basically, it looks like recv is being called on fd 22 which is opened
earlier with:

socketpair(PF_FILE, SOCK_STREAM, 0, [21, 22]) = 0

 after it's already been closed! My app only uses ZMQ TCP sockets, so the
socketpair seems like it's probably internal to ZMQ. Switching transports
makes no difference.

The full strace is here:

http://dl.dropbox.com/u/7376989/weirdzmqstrace.txt

I wish I had a minimal test case, but it's part of a complex ruby app, and
extracting one might not even be feasible. It's 100% reproducible given a
certain sequence of events in the app however, it always occurs after the
same number of messages.

If anyone DOES want to setup the app, it's OSS, and I'd be glad to help in
IRC, I'm andrewvc in the chat room.

-- 
Andrew Cholakian
http://www.andrewvc.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110210/1a95f0e6/attachment.htm>


More information about the zeromq-dev mailing list