s3tools/s3cmd — pull request #70 by spikegronim (2012-07-13 16:09:12+00:00)
Title: Raise if read of object bytes returns 0 bytes.

Hello s3cmd maintainers! At wavii we have been seeing s3cmd hang while reading large numbers of medium sized (~4MB) files from S3 within EC2. The symptom is that strace reports an infinite loop of poll, recvfrom. Poll indicates that the socket is closed (POLLHUP) and recvfrom returns 0 each time. The output of netstat indicates that the socket is gone. The S3 class was not respecting a zero byte return from the httplib connection. Without this fix s3cmd hangs once every 2-3 hours under our workload. With the fix it hasn't hanged in over 12 hours.

- indication of EOF on the socket

PS Thanks for the great tool!