If a file being uploaded is rotated, a race condition in object_put() between opening the stream and calculating the length will cause this function to get stuck in a while loop because it will be trying to read more bytes then exist in the file which this function opens. When this occurs, read will return 0 bytes causing this function to get stuck into a while loop causing the script to peg a single core to 100% cpu.
|
chunk = f.read(min(8192, size_left)) |
If a file being uploaded is rotated, a race condition in object_put() between opening the stream and calculating the length will cause this function to get stuck in a while loop because it will be trying to read more bytes then exist in the file which this function opens. When this occurs, read will return 0 bytes causing this function to get stuck into a while loop causing the script to peg a single core to 100% cpu.
s3cmd/S3/Crypto.py
Line 264 in a163fd4