cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: "100% CPU usage during SFTP transfer" bugfix

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 24 Aug 2009 15:37:05 +0200 (CEST)

On Mon, 24 Aug 2009, Kamil Dudka wrote:

> Bad news - the patch does not work. It ends up in a tight loop, now
> unfortunately without transferring any data. The functions readwrite_data()
> and readwrite_upload() were not called at all.

Hm, ok. Thanks for testing. Clearly too simple of a change. We need to do
somewhat more intrusive changes to get this rolling fine.

> Is Curl_readwrite() really the function which should block? I think we
> should solve the problem elsewhere.

No, Curl_readwrite() should not block but it should only check for traffic in
the desired direction(s) so I think the change is at least in the right
direction.

The block should be done in lib/transfer.c:Transfer() so that will also need
similar magic where it should get the 'waitfor' bits instead of the 'keepon'
set if they are indeed set.

Curl_single_getsock() also needs to get updated in the same spirit so that the
multi interface get improved this way too.

-- 
  / daniel.haxx.se
Received on 2009-08-24