Author xdegaye
Recipients giampaolo.rodola, josiahcarlson, stutzbach, terry.reedy, xdegaye
Date 2011-10-26.19:24:55
SpamBayes Score 1.29285e-13
Marked as misclassified No
Message-id <1319657097.65.0.798876452476.issue5661@psf.upfronthosting.co.za>
In-reply-to
Content
> I am not marking 'test needed' since the problem is 'hardly reproducible'.

The attached script named 'asyncore_epipe.py' may be used to reproduce
systematically the EPIPE error on linux with Python 3.2:

    * the Reader closes the socket after receiving the first data
    * the Writer gets an exception when attempting to write the next
      message on the closed socket

When you run 'python asyncore_epipe.py' or 'python asyncore_epipe.py
1025' you get an EPIPE error (1025 is the size of exchanged messages,
so the last Writer message has been fully read by the Reader before
closing).

When you run 'python asyncore_epipe.py 128' you get an ECONNRESET (the
Reader reads only 128 bytes before closing the socket)

Note that ECONNRESET has been removed in this script, from the
frozenset of handled errors, to make this last point visible.

So it seems that, on linux, when writing to a closed socket, you get
an ECONNRESET when there is still data in the socket, and an EPIPE
otherwise. In the first case the tcp connection ends with a single
RESET, and in the second case it ends with the sequence FIN-ACK-RESET.
History
Date User Action Args
2011-10-26 19:24:57xdegayesetrecipients: + xdegaye, terry.reedy, josiahcarlson, giampaolo.rodola, stutzbach
2011-10-26 19:24:57xdegayesetmessageid: <1319657097.65.0.798876452476.issue5661@psf.upfronthosting.co.za>
2011-10-26 19:24:57xdegayelinkissue5661 messages
2011-10-26 19:24:56xdegayecreate