cURL / Mailing Lists / curl-library / Single Mail


Re: Windows build: CURLE_PARTIAL_FILE issues transferring large files via SFTP with LibSSH2 1.2.8.

From: Daniel Stenberg <>
Date: Mon, 23 May 2011 20:09:49 +0200 (CEST)

On Mon, 23 May 2011, Patrik Thunström wrote:

> I thought I'd toss a question/issue report up a bit in the air. As I'm not
> exactly sure about what is the exact source/cause of the issue is, I'll
> start with it here, but it might very well be better suited for the LibSSH2
> mailing list.

Thanks for the detailed write-up. Yes I believe it is a subject for the
libssh2 list. I'll elaborate:

> against libssh2 1.2.7 the issue is nowhere to be found. As soon as I tick
> this up to version 1.2.8 however, I immediately find the CURLE_PARTIAL_FILE
> issue as described.
> Is this an known issue, or is it a undocumented bug? It feels like it might
> be quite related to the read/write rewrite of libssh2

It feels very likely to be related with the SFTP rewrite of libssh2 in 1.2.8.
I redid the whole "upper layer" parts of the lib to be able to get really high
performance, which really wasn't possibly previously. libcurl really hasn't
been modified for this, even if it can or should be to really make it possible
to do high speed SFTP transfers. But on the other hand, it shouldn't have to
be modified as it should still work unmodified, it is just not working as fast
as it could.

The downside of my rewrite of the libssh2 SFTP code is that I introduced a bug
that we've only got reports for on Windows
( and nobody has been able to track it down
and fix it properly. I don't use windows myself for development and debugging
and despite my efforts I haven't managed to repeat this on Linux.

What possibly speaks against that your experienced problem is the exact same
as this libssh2 issue #205 is the fact that you only got a libcurl
CURLE_PARTIAL_FILE error and not something identifying a libssh2/SFTP problem
which I otherwise would've thought you'd get if you got the #205 error.

In order to track this down, it will help if you can write a "pure" libssh2
program that repeats the problem at least with some level of certainty or
compare your code with the code posted in #205 to see if they might be the
same. Then work with us on the libssh2 list to debug it...


List admin:
Received on 2011-05-23