Bugs item #1826989, was opened at 2007-11-06 17:50 Message generated for change (Comment added) made by bagder You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=703942&aid=1826989&group_id=125852
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: SFTP Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: antonio (tonyspoken) >Assigned to: Daniel Stenberg (bagder) Summary: libssh2_sftp_readdir() hangs forever Initial Comment: An abnormal situation of hanging is noted when doing a remote dir read on a particular directory with the ibssh2_sftp_readdir_ex(). In attach the complete stdout log. ---------------------------------------------------------------------- >Comment By: Daniel Stenberg (bagder) Date: 2007-11-07 16:41 Message: Logged In: YES user_id=1110 Originator: NO Well, I wrote the transport.c file and functions but what you describe sounds like there's a bug somewhere that makes the code get stuck in a way it shouldn't. And then I doubt it helps much that I wrote it, since I didn't mean to introduce bugs of this kind and I can't say I know where they are now... Your report doesn't say what libssh2 version you're using, but if it's not the current CVS (recent daily snapshot) please try that since I've fixed a few bugs since 0.17 that would result in something like this. I would also be interested in knowing how to repeat this problem so that I can debug/assist in my end, should I get time for it. ---------------------------------------------------------------------- Comment By: antonio (tonyspoken) Date: 2007-11-07 15:25 Message: Logged In: YES user_id=177324 Originator: YES I'm further investigating this problem. I got one interesting thing from logs and network snoops. The problem seems connected to the amount of datas we're grabbing from the network. In particular after calling libssh2_sftp_readdir() the SSH server is responding us with a 4100 bytes packet, that from libssh2 point of view is got in two different stages (4096 bytes raw data + further 4 bytes raw data, as can be seen from the logs) because 4096 is the actual fixed dimension of the chunk size, as defined in lissh2_priv.h (PACKETBUFSIZE). The faulty and hanging situation is not appearing anynmore in two different cases: - for example if we add a new file in the directory - we change the PACKETBUFSIZE value Both of the two options leads to a change in the number of bytes actually exchanged between server and client (for example when adding a new file in the remote directory to be ls-ed, the received 4100 bytes returned from SSH server became 4196, and everything went fine). I can deep analyze it more, but probably someone who's inside the transport and packet routines could speed up things a lot. Any help is appreciated. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=703942&aid=1826989&group_id=125852 ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ libssh2-devel mailing list libssh2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libssh2-devel