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

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Mon Nov 17 08:38:03 MST 2014


On 02:51 pm, peter.westlake at pobox.com wrote:
>
>Looking at the code, _SignalReactorMixin.mainLoop() takes the output of
>ReactorBase.timeout() and passes it to doIteration(). The 
>implementation
>of doIteration() in PollReactor passes the value straight through to
>poll(). If there is any kind of timed call pending (which there is), 
>the
>timeout value counts down. Eventually it gets very close to zero. If
>there is a burst of AMP activity around that time, there's a good 
>chance
>that the one of the poll() calls will time out.
>
>How this leads to the data being lost is another question, but the
>coincidence of events is too much to ignore.

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.

Jean-Paul




More information about the Twisted-Python mailing list