[zeromq-dev] weird bug

Stephen Lord Stephen.Lord at quantum.com
Mon Mar 5 19:10:14 CET 2012

I had been having major problems running profiled executables which
use zmq, there is something about running a binary compiled with -pg
which must cause EINTR returns internally, I have been getting EINTR errors
back from both zmq_send and zmq_recv, nothing in the code is
explicitly generating EINTR. I have resolved this by retrying the ZMQ calls
on EINTR and it works, however I am not convinced it is a correct
solution because after the call returns an error like this, I do not really
know what has been sent or received on the zmq socket.

With system calls such as epoll_wait, sendmsg and recvmsg, there are
defined behaviors here. recvmsg will return EINTR if the signal is delivered
before any data was available, on sendmsg it is only delivered before any
data was sent.

Because of these rules, system call restart is possible, however, with
zmq_send() getting EINTR, I do not know if anything made it onto the
socket or not or what to do with the zmq_msg_t structure.


The information contained in this transmission may be confidential. Any disclosure, copying, or further distribution of confidential information is not permitted unless such privilege is explicitly granted in writing by Quantum. Quantum reserves the right to have electronic communications, including email and attachments, sent across its networks filtered through anti virus and spam software programs and retain such messages in order to comply with applicable data security and retention requirements. Quantum is not responsible for the proper and complete transmission of the substance of this communication or for any delay in its receipt.

More information about the zeromq-dev mailing list