I used libssh2 0.17 version both with the latest patch in CVS you provided for the SCP case of hanging, and without this patch(pure 0.17 version). And probably i misused the "window size" expression here. I simply passed a read buffer of 32 and 16 Kb to the libssh2_sftp_read, ready to be filled. What i noticed was that also with the 16 Kb buffer request, using a file larger than 10 Meg the downloads hung at a certain point.Have you ever tried to manipulate the sftp_RW_nonblock.c using larger buffers (i.e. 16,32Kb) instead of the 1000 bytes buffer in the example, and to download larger files? Most probably you could replicate the same scenario... Let me know if you have the same behaviour. Thank you very much for the support.
Antonio > -----Messaggio originale----- > Da: Daniel Stenberg [mailto:[EMAIL PROTECTED] > Inviato: martedì 25 settembre 2007 22.57 > A: [EMAIL PROTECTED] > Cc: libssh2-devel > Oggetto: Re: [libssh2] SFTP read hanging forever (LIBSSH2_ERROR_EAGAIN) > > On Tue, 25 Sep 2007, [EMAIL PROTECTED] wrote: > > > 1) If i use a window size of 32768 at a certain point the > libssh2_sftp_read > > returns a EAGAIN value forever. The select doesn't return any negative > or > > zero values, meaning probably that the library is not reading anymore > from > > the socket ... This problem presents itself in a quite random fashion, > so > > sometimes the file is downloaded sometimes not. > > What libssh2 version? And what window size mod was a plain source code > modification, wasn't it? > > > 2) Lowering the download windows size, library seems to work correctly. > But > > i tried to do an experiment: while download was in progress i put the > > openSSH server offline (unpluggin the cable) the result was that the > library > > libssh2_sftp_read returned a EAGAIN value forever, and the select didn't > > fail at all. > > Sounds like there's a (at least one) bug somewhere in there then... > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.488 / Virus Database: 269.13.30/1030 - Release Date: > 25/09/2007 8.02 > No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.488 / Virus Database: 269.13.30/1030 - Release Date: 25/09/2007 8.02 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ libssh2-devel mailing list libssh2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libssh2-devel