Subject: Re: SFTP issues

Re: SFTP issues

From: Salvador Fandiņo <sfandino_at_yahoo.com>
Date: Fri, 24 Feb 2012 03:01:50 +0100

On 02/23/2012 06:34 PM, Salvador Fandino wrote:
> On 02/23/2012 05:28 PM, Peter Stuge wrote:
>> Salvador Fandino wrote:
>>> problems when his transfers go over
>>> 1.5GB using Net::SSH2 compiled against libssh2 1.2.8.
>>
>> You have to send more information. "It doesn't work" is impossible to
>> act on. Send logs. Send packet dumps. Actually with libssh2 they are
>> one and the same.
>>
>> It's impossible to help without any information.
>
> Did you read the part where I said I am planning to write a proper bug
> report? Just that it is going to take me some time to get rid of the
> Perl layer.

here it goes:

Attached is a binary log, "dump.gz", of the read and write operations
generated by Net::SFTP::Foreign and a C program, "replay.c", (actually,
a hacked version of ssh2.c from the tests directory) that is able to
load this log and replay it to some SSH server.

Copy "replay.c" and "dump.gz" inside the libssh2-1.4.0 directory and
build "replay" with the following command:

   gcc -Iinclude -Isrc -g -O2 -c -o replay.o replay.c && \
      libtool --tag=CC --mode=link gcc -g -O2 -o replay \
      replay.o src/libssh2.la

Then, create the directory /tmp/test on the server and run the following
command:

   zcat dump.gz | USER=your_login \
     PUBKEY=$HOME/.ssh/id_dsa.pub \
     PRIVKEY=$HOME/.ssh/id_dsa ./replay

After a while you will see
   ...
   writing 285 bytes of 285
   written count: 285
   written current: 285
                 written total: 2666819 read total: 262141
   reading 4 bytes of 4
   read count: 3
   read current: 3
                 written total: 2666819 read total: 262144
   reading 1 bytes of 4

an at that point, the transfer will stall.

BTW, I am using Ubuntu Precise Pangolin (current) for amd64, OpenSSL
1.0.0g and gcc 4.6.1 from the Ubuntu repository and have tested libssh2
1.4.0 and yesterday's git version.

I am running the test against localhost:22 that identifies itself as
"SSH-2.0-OpenSSH_5.9p1 Debian-2ubuntu2".

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Received on 2012-02-24