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: Fri, 21 Aug 2009 09:42:30 +0200 (CEST)

On Fri, 21 Aug 2009, Kamil Dudka wrote:

>> libssh2_session_block_directions() directly to figure out what to wait for.
>> Quite possibly that should rather use the 'waitfor' variable instead. Can
>> you compare the results from that libssh2_session_block_directions() call
>> with the contents of the waitfor variable to see if you can detect
>> deviances during transfer?
>
> Sure, the content is the same and seems ok to me, but it differs from
> conn->data->req.keepon when looping.

Oh. Ouch. Hmmm. Grrr. Uuuuuh.

Yeah, I can see exactly what you're saying and of course this doesn't work as
intended. We need to make sure that the (ssh-) block-bits can be used by the
Curl_readwrite() function during the transfer phase as the 'keepon' direction
is too simple for this purpose. And we need to make it somewhat protocol
indepdent so that we don't just make a ssh kludge in the generic transfer.c
code.

I'll need to go back to staring at that code for a while more before I take a
stab at this. If anyone else does it first, by all means go ahead!

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