[zeromq-dev] EINTR and company

sven.koebnick at t-online.de sven.koebnick at t-online.de
Fri Dec 19 14:25:05 CET 2014


Hi and thx for your fast answer. 

I just this minute fixed some
further things for getting to 64bit and found the fixings for the (still
segfaulting) 64bit system, when brought back to the 32bit system to
segfault there also. 

Poking in some senseless sleep()s just before the
segfaulting parts made the thing run a little bit longer before
segfaulting again. 

This is a clear sign, that I have errorneous memory
writes resulting in thread's SIGSEGV based on race conditions. This can
(of course) lead to any error, including lost messages etc. 

afraid, the system ran just by luck over the last two years and now
(using new libs) crashes instead of just killing >harmless< memory (as
obviously happened in my "old" version). 

==> clearly some work to do
on my side before I can begin with being surprised again ;o) 

moment to do a complete code review ;o) 

merry xmas 


2014-12-19 12:45, schrieb Dorvin: 

> W dniu 2014-12-19 o 10:33,
sven.koebnick at t-online.depisze:
>> 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 
> and 
[2]. In general you may usually ignore signals unless you really need
> 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
> 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.
> Jarek
> _______________________________________________
zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev [3]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20141219/b3a3aebf/attachment.htm>

More information about the zeromq-dev mailing list