win32eventreactor doesn't notice TCP connection is lost in certain (hopefully rare) cases
|Reported by:||Itamar Turner-Trauring||Owned by:||Jean-Paul Calderone|
branch-diff, diff-cov, branch-cov, buildbot
test_resumeProducingThrows -- demonstrates the win32eventreactor problem: it doesn't notice a lost TCP connection. The problem doesn't appear to have anything to do with the
abortConnection call; the test still fails if that line is commented out.
Protocol A connects over loopback to Protocol B. Protocol A's
resumeProducing gets called from its transport's
resumeProducing throws an exception. At this point we expect the following to happen:
- Exception thrown from resumeProducing is logged, and Protocol A has its
- Protocol B, which is connected to A over TCP, should also get its
While item 1 happens, item 2 does not. As far as I can tell,
MsgWaitForMultipleObjects never notices that B has lost its connection.
Only workaround I found: making the socket close with SO_LINGER set to 1,0, i.e. force RST instead of FIN. In this case MWFMO does notice the connection was lost.
Change History (29)
comment:5 Changed 5 years ago by
|Branch:||branches/win32er-close-5233 → branches/win32er-close-5233-2|
comment:9 Changed 5 years ago by
|Owner:||changed from Itamar Turner-Trauring to Jean-Paul Calderone|
comment:20 Changed 5 years ago by
|Owner:||changed from Glyph to Jean-Paul Calderone|
|Status:||assigned → new|
comment:25 Changed 5 years ago by
|Owner:||changed from zseil to Jean-Paul Calderone|