This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients alex, christian.heimes, dstufft, janssen, martin.panter, vstinner
Date 2017-06-03.22:26:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496528816.78.0.580406572175.issue30319@psf.upfronthosting.co.za>
In-reply-to
Content
Making this an index of related reports:

Issue 30319: test_imap
Issue 30315: test_ftplib
Issue 30543: test_timeout
Issue 30328: test_ssl
Issue 27784: test_asyncore.TestAPI_UseIPv6Select.test_handle_accept, test_socketserver
Issue 30106: test_asyncore.TestAPI_UseIPv6Poll.test_handle_write

These all look like a side effect of my change to raise an error from the OS as an exception when closing a socket, Issue 26685. Only 3.6+ is affected. According to <https://www.freebsd.org/cgi/man.cgi?close%282%29>, ECONNRESET means “The underlying object was a stream socket that was shut down by the peer before all pending data was delivered”.

It seems this is specific to Free BSD. See bug report about Posix compliance: <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=159179>. According to <https://forums.zeroc.com/discussion/5569/patch-to-network-cpp-for-freebsd-for-econnreset-on-close-2-problem> this started in Free BSD 6.3 in 2006.

I suppose the options are:

1. Completely revert Issue 26685 and ignore all “socket.close” errors (my least preferred option)
2. Ignore ECONNRESET in “socket.close” (backwards compatible, could use “os.close” if you really want to check for ECONNRESET)
3. Ignore ECONNRESET in the various higher-level libraries
4. Adjust the tests to ignore the error or otherwise avoid the problem
History
Date User Action Args
2017-06-03 22:26:56martin.pantersetrecipients: + martin.panter, janssen, vstinner, christian.heimes, alex, dstufft
2017-06-03 22:26:56martin.pantersetmessageid: <1496528816.78.0.580406572175.issue30319@psf.upfronthosting.co.za>
2017-06-03 22:26:56martin.panterlinkissue30319 messages
2017-06-03 22:26:56martin.pantercreate