[zeromq-dev] perl + zmq + anyevent issue

Whitney Jackson whjackson at gmail.com
Wed Feb 13 06:57:02 CET 2013


Hi,

I'm having a problem where my AnyEvent I/O watcher fails to notice that a
ZeroMQ socket is readable under certain specific conditions. Here's my
setup:

- Two processes (one blocking / one non-blocking using AnyEvent)
- The connection is DEALER-DEALER via an IPC endpoint.

The problem occurs when I execute the following steps in this specific
order:

1) non-blocking process creates a socket and binds
2) non-blocking process sets up an AE I/O watcher
3) non-blocking process sends
4) blocking process creates socket and connects
5) blocking process recvs
6) blocking process sends

At this point, if I force a recv within the non-blocking process I see the
data sent by the blocking process in step 6. However, my AnyEvent I/O
watcher is never triggered.

Here's some example code that demonstrates the issue:

http://pastebin.com/KWsXb9TL


I've noticed that if I switch which process binds and which connects the
problem goes away. Does anyone know what might be going on here?

I'm using ZeroMQ v2.2 and have tested on a couple different linuxes.

Thanks,

Whitney
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130212/64ad2a19/attachment.htm>


More information about the zeromq-dev mailing list