On Mon, 17 Nov 2014, at 15:38, exar...@twistedmatrix.com wrote: ... > This is entirely normal. It's how timed calls are implemented in almost > all of the reactors and it's how they've been implemented for at least > 13 years. :) > > It's possible there's a bug here but this sequence of poll() calls with > these timeout values doesn't surprise me at all.
Yes, I ran it again (using the select reactor this time) and the failures happened even without the timing out. The one thing that is consistent is the loss of data after EAGAIN. recvfrom returns EAGAIN and the next AMP reply is lost. It's a known bug in Python! http://bugs.python.org/issue1038591, "Python 2.3+ socket._fileobject handles EAGAIN with data loss". This bug has been there for TEN YEARS without being fixed. It's still right there in the source of 2.7.8. The ticket has a comment from 2011 saying it should work in Python 3.x (and the code does look as though it should), and a suggestion from 2013 that it should be closed. So, how's that port to Python 3 going? Peter. _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python