[Python-Dev] Possible bug in socket.py: connection reset by peer (original) (raw)

Michal Kawalec mkawalec at lavabit.com
Sat Mar 2 12:48:05 CET 2013


Hello, I am experiencing an odd infrequent bug in Python 2.7.3 with GIL enabled. For some files pushed over TCP socket I get 'connection reset by peer' and clients only receive a randomly long part of the file.

This situation occurs only in ~0.1% of cases but if it happens for a given file it keeps on always occuring for that file. The server host is 2-cored Linux 3.8.1 on a VMware VM.

The problem is mitigated by adding time.sleep(0.001) just before the portion of data is being pushed though the socket. It also seems to be known for a long time [1].

So my question is - is it something that I can expect to be fixed in the future Python releases?

Michal

[1] http://stackoverflow.com/questions/441374/why-am-i-seeing-connection-reset-by-peer-error

-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 555 bytes Desc: OpenPGP digital signature URL: <http://mail.python.org/pipermail/python-dev/attachments/20130302/78d9f80d/attachment.pgp>



More information about the Python-Dev mailing list