cURL / Mailing Lists / curl-users / Single Mail

curl-users

100% CPU usage when connection closed on HTTP upload

From: Matt Witherspoon <spoon_at_vt.edu>
Date: Thu, 30 Nov 2006 09:26:34 -0500

Hello, I'm having a problem with curl (and also the same problem with anything
made in libcurl). I can reproduce it 90% of the time with the following 2
methods. Curl is compiled on Linux, and I'm seeing the same problem with 7.13.1
and 7.16.0. I am seeing the problem on multiple machines (multiple CPU types as
well).

Method 1:
On client computer, start curl like so:
./curl -T some.big.file http://10.1.1.10/UploadedFile
During the upload, kill the HTTPd on the server computer.
curl instantly jumps to 100% CPU usage.

Method 2:
On client computer, start curl the same way:
./curl -T some.big.file http://10.1.1.10/UploadedFile
During the upload, unplug the server computer from the network
Note curl is NOT using any CPU
Plug the server computer back into the network
curl CPU usage jumps to 100% (sometimes you have to give it 5-15 seconds after
the server computer to replugged into the network before this happens)

For the other 10% of the time, Curl correctly exits with:
curl: (55) Send failure: Connection reset by peer

If this problem happens in a libcurl application, the progress callback is still
called once a second.

This only seems to happen with HTTP upload (not HTTP download or FTP
upload/download). 7.16.0 was compiled by myself, 7.13.1 came with FC4. Anyone
have any suggestions? I will attempt to look into the Curl source, but I
thought I'd check on here before going that route in case I'm simply doing
something wrong :)

Thanks, Matt
Received on 2006-11-30