[Twisted-Python] How do I debug this network problem?

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Tue Nov 18 18:17:37 MST 2014


On 18 Nov, 12:52 pm, peter.westlake at pobox.com wrote:
>On Tue, 18 Nov 2014, at 01:09, exarkun at twistedmatrix.com wrote:
>>On 12:42 am, peter.westlake at pobox.com wrote:
>
>> >Okay, how about http://bugs.python.org/issue9090, "Issue #9090 : 
>>Error
>> >code 10035 calling socket.recv() on a socket with a timeout
>> >(WSAEWOULDBLOCK - A non-blocking socket operation could not be
>> >completed
>> >immediately)"?
>>
>>Twisted also doesn't use sockets with timeouts - although the way 
>>socket
>>timeouts are implemented in Python, I could perhaps imagine some 
>>timeout
>>configuration leaking into Twisted's sockets due to some other code
>>running in the same process.
>>
>>Can you check to see if your AMP connection's underlying socket has a
>>timeout set?  It *shouldn't*.  Twisted doesn't set one.  If some other
>>code is causing a timeout to be set, I guess this could be the 
>>culprit.
>
>socket.gettimeout() returns 0.0, which just means non-blocking, right?

According to the Python documentation, yes.  I was expecting to see 
`None` instead, though.
>Given that strace shows a recvfrom failing with an EAGAIN, followed by
>a recvfrom reading the AMP reply after the missing one, I think this
>must
>be a kernel or hypervisor bug. In hindsight it could never have been
>1038591
>even if Twisted had used that bit of code, because that reads the data
>in and
>then loses it. So strace would have shown it being read.
>
>I'll get some help from my local TCP experts, and let you know if I 
>find
>anything
>out. In the meantime, thank you all for your patience and help.

Good luck!  Please let us know if you discover anything else.

Jean-Paul




More information about the Twisted-Python mailing list