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

Glyph glyph at twistedmatrix.com
Thu Nov 13 09:23:15 MST 2014


> On Nov 13, 2014, at 3:40 PM, Peter Westlake <peter.westlake at pobox.com> wrote:
> 
> I'm certainly not averse to understanding the code, and if you had time to describe it, that would be very kind, thank you!

Well if it's not even hitting dataReceived then a more subtle exploration is not necessary! ;-)

> I've put in the dataReceived, and the answer box does not make it into the Protocol. There are two entries in protocol._outstandingRequests: {'2189': <Deferred...>, '2188': <Deferred...>} and the log output shows 2186, 2187, 218a, 218b, ...

So, wait a second.

You said you're looking at tcpdump, and it's showing you that your outstanding requests - in this case, 2188 and 2189 - are in fact being answered. But then you say you're looking at the dump from dataReceived, and seeing that not only are 2188 and 2189 not being answered from that layer, but 218a and 218b are being answered?

Simply put: that should be impossible.  TCP is an ordered stream.  If you received answers to 2188 and 2189 on the wire in tcpdump, you should see those come back to dataReceived first.  What kind of transport is this hooked up to?  A regular socket?  Is there TLS involved?  Did you run tcpdump for that same session?

-glyph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20141113/285ffe3c/attachment-0002.html>


More information about the Twisted-Python mailing list