[zeromq-dev] EINTR and company

Dorvin dorvin at tlen.pl
Fri Dec 19 12:45:40 CET 2014


W dniu 2014-12-19 o 10:33, sven.koebnick at t-online.de pisze:

> Formerly (using V2), I nearly never got EINTR-returns. Now, I get plenty
> of them (not only in debugging, but also when just running without any
> disturbance). I did what was recommented by compiler docu etc.: I
> retryed, until sending, receiving or polling was a) successful or b)
> delivered a real (not temporary) error (which only happens, when it in
> deed should).

Things changed between V2 and V4. For EINTR please read 
http://lists.zeromq.org/pipermail/zeromq-dev/2012-September/018754.html 
and 
http://lists.zeromq.org/pipermail/zeromq-dev/2010-September/005814.html 
. In general you may usually ignore signals unless you really need them, 
f.e. to react on SIGINT (read guide for this).


> That sound pretty complicated, but worked for two years now with ZMQ V2.
> At different positions the requests or the answers get lost in ZMQ
> (!!!). I assume, I did something wrong, so I'd like to ask, if s'one had
> the same problem and allready fixed it, because I do not have anymore
> ideas where to look. A symptom is, that for about 60-100 messages, I now
> get 10 to 15 EINTR returns and I guess, that this has something to do
> with my lost messages.
>
I'm not sure if losing messages is related to EINTR. I'd rather say your 
code is not prepared fully for V4. For example you should check return 
values for -1 for failures and not being not equal 0. Please see API 
docs for details on particular functions. I can't tell what else should 
be verified as I don't know your code. In general - check your 
application against all contracts in V4.


Cheers,
Jarek




More information about the zeromq-dev mailing list