Subject: Re: libssh2_sftp_init() hangs with zlib compression turned on

Re: libssh2_sftp_init() hangs with zlib compression turned on

From: Peter Stuge <peter_at_stuge.se>
Date: Mon, 13 Jan 2020 16:15:20 +0000

Gebi Miguel wrote:
..
> [libssh2] 0.467090 SFTP: Sending FXP_INIT packet advertising version 3 support
> [libssh2] 0.469085 Conn: Writing 9 bytes on channel 0/0, stream #0

Thanks for providing this debug output.

> This last line is always where things end. When I "break" the running
> process in Visual Studio I end up on line 140 in misc.c, at the call
>
> rc = recv(sock, buffer, length, flags);
>
> within _libssh2_recv(). My OS is Windows 10,
..
> the result is always the same, cannot make it beyond libssh2_sftp_init()
> with zlib compression turned on.
>
> Any suggestions? Thank you very much for your time!

I guess that the compressed packets are actually not completely correct,
and that the server thus never sends any reply.

Can you also enable transport layer tracing, and look at the
difference in output between libssh2 with and without zlib?

Possibly add debugdump() calls around/after compression in transport.c,
look for this line:

  rc = session->local.comp->comp(session,

The next step would then be to manually decompress/decode the packets
as sent by libssh2 built with zlib, to validate whether they are actually
correct. The list might be able to help with that if you post output
from added debugdump() calls.

Kind regards

//Peter

_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2020-01-13