cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Stall when uploading to sftp using multi interface

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 23 Feb 2011 10:16:53 +0100 (CET)

On Wed, 23 Feb 2011, Henry Ludemann wrote:

> When uploading to an sftp server using the multi interface, curl
> 7.21.4 hangs before it starts transferring the payload.

Just let me clarify to all readers that you are talking about the multi socket
API here, right?

Also, as you're talking SFTP you're using libssh2 and then the exact version
of libssh2 is a vital information. I would even recommend that you at least
test with a libssh2 version from git or daily snapshot since there's been
quite some time and development since libssh2 1.2.7 was released.

> It hangs because curl hasn't asked for any timeouts

You mean the timeout callback was never called?

> or sockets to be polled (note that final 'poll remove' message and the
> earlier 'Curl timer: -1ms' message), but I still don't know how it got into
> this state. It happens every time.

Can you help us to write an example SFTP upload code using the multi socket
API that we can use to repeat this problem?

> I'm going to continue to debug the issue, but if you have any suggestions,
> questions (or ideally, a patch :-) ), please don't hesitate to let me know!

The key to this issue (so far) seems to be that libcurl doesn't report to the
app that it should wait for the socket to become writable (or readable)
properly. That's taken care of by the ssh_perform_getsock() function.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-23