cURL / Mailing Lists / curl-users / Single Mail

curl-users

SCP Breaks after some KB

From: Marc Kannegiesser <macs_mailinglists_at_gmx.de>
Date: Sat, 22 Sep 2007 17:05:10 +0200

Hi.

I am currently trying to get curl (or libcurl, or curlpp-wrapper) to work in my application.
I try to transfer files using SCP which works pretty good.

But there seems to be a problem when I transfer bigger files.

This happens using curlpp (Wrapper for c++ around libcurl) and using the commandline.

I use the following command:

bin/curl -T myFile -u user:password scp://example.org/tmp/

This - as mentioned - works for small files but breaks for big ones:

When i try to transfer a file with size > 192KB curl hangs forever.

I straced the programm. This looks like:

[snip]

poll([{fd=4, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
read(3, "a\237L\236:\376\375\361c\264\2o<\3340\202\202z\225x\001"..., 16384) = 1
6384
send(4, "\32\250\373;/\221\322\237\314\265j\23p\347\6\375\27\201"..., 16436, MSG_NOSIGNAL) = 16436
gettimeofday({1190472242, 151790}, NULL) = 0
gettimeofday({1190472242, 151846}, NULL) = 0
gettimeofday({1190472242, 151904}, NULL) = 0
poll([{fd=4, events=POLLOUT, revents=POLLOUT}], 1, 1000) = 1
poll([{fd=4, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
read(3, "\7\250\242\16O\214<\207\336\356\310\f\232\2072\17j\26d"..., 16384) = 16384
gettimeofday({1190472242, 260925}, NULL) = 0
gettimeofday({1190472242, 260982}, NULL) = 0
gettimeofday({1190472242, 261038}, NULL) = 0
poll([{fd=4, events=POLLOUT, revents=POLLOUT}], 1, 1000) = 1
poll([{fd=4, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
gettimeofday({1190472242, 261206}, NULL) = 0

[ gettimeofday and poll forever ] [ snap ]

I use the current release version and the current version of libssh2:

bin/curl --version
curl 7.17.0 (i686-pc-linux-gnu) libcurl/7.17.0 OpenSSL/0.9.8d zlib/1.2.3 libidn/0.6.5 libssh2/0.17
Protocols: tftp ftp telnet dict ldap http file https ftps scp sftp
Features: IDN Largefile NTLM SSL libz

It is really important to transfer these files using SCP and im really in trouble if this does not work soon... Plase help! ;)

Thanks in advance,

Marc
Received on 2007-09-22