Menu

#1174 curl only transfers 146Mb via sftp

closed-invalid
SCP/SFTP (19)
5
2013-06-21
2012-12-12
realdoug
No

curl only transfer 146Mb while uploading a file via sftp
opensuse 12.2

# curl -V
curl 7.28.1 (i586-suse-linux-gnu) libcurl/7.25.0 OpenSSL/1.0.1c zlib/1.2.7 libidn/1.25 libssh2/1.4.0
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP

# uname -a
Linux test 3.4.6-2.10.1-pae #1 SMP Thu Jul 26 06:36:26 BRT 2012 (641c197) i686 i686 i386 GNU/Linux

how to reproduce:
create a file with ~160Mb
# dd if=/dev/zero of=file bs=1024 count=160000

transfer the file
# curl -k -T file -u root:pass sftp://localhost

then curl stops at 146Mb
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
93 156M 0 0 93 146M 0 826k 0:03:13 0:03:01 0:00:12 0^C

Discussion

  • Daniel Stenberg

    Daniel Stenberg - 2012-12-12

    Thanks for the report.

    Does it repeatedly end at the same point?

    I'd like you to try to build an example for libssh2 and do a "raw" SFTP transfer using such a build to see if you get the problem then as well, as curl is relying purely on libssh2 for the underlying SFTP protocol stuff. Also, there has been 3 releases of libssh2 since the version you're using and especially the 1.4.2 version contains a lot of SFTP fixes that may (or may not) be relevant and possibly fix flaws you experience.

    When it stops the transfer prematurely, doesn't it give any error?

    You have a weird mismatch with a curl 7.28.1 but an older libcurl. That looks like a funny install - possibly a later libcurl version could change something.

     
  • realdoug

    realdoug - 2012-12-12

    Hi,
    Yes, it always stops at the same point if the file size is larger than 146Mb.
    Note: it only happens with sftp, if I change to scp then it works.
    No error is reported, the connection keeps stablished, the speed upload is 0

    I updated the libcurl, but the same issue happens
    # curl -V
    curl 7.28.1 (i586-suse-linux-gnu) libcurl/7.28.1 OpenSSL/1.0.1c zlib/1.2.7 libidn/1.25 libssh2/1.4.0
    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
    Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-12-13

    I'm still mostly interested in how it works with an updated libssh2 version...

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-12-21
    • status: open --> pending
     
  • Daniel Stenberg

    Daniel Stenberg - 2013-01-03
    • status: pending --> closed-invalid
     
  • Daniel Stenberg

    Daniel Stenberg - 2013-01-03

    This is most likely a libssh2 problem, if at all.