Subject: Re: libssh2_sftp_init() hangs and does not return while consuming 100% CPU

Re: libssh2_sftp_init() hangs and does not return while consuming 100% CPU

From: Ismail Aseen <ismaildeh_at_yahoo.com>
Date: Wed, 23 Mar 2016 04:47:35 +0000 (UTC)

Hi,
Adding one more point to the above mail, in the function sftp_packet_read in sftp.c file, is it a defect to not to address the zero return from _libssh2_channel_read function  in the while loop found in sftp.c:377 ?
Thanks & Regards,Ismail Aseen

    On Tuesday, 22 March 2016, 23:40, Ismail Aseen <ismaildeh_at_yahoo.com> wrote:
 

 Hi,
I have an application which uses libssh2 to transfer files using SFTP. It was working well till I had this problem where libssh2_sftp_init() hangs and does not return while consuming 100% CPU.  I did a stack trace using gstack and got the following stack. Please note that this incident occurred only once for me and it is not re created again. This incident happened while communicating with Windows based SFTP server(Tectia). I am using libssh2-1.6.0. version. Is this a known issue? could anybody assist on this?

#0  0x00007fd3c719e6ac in recv () from /lib64/libc.so.6
#1  0x00007fd3c947511b in _libssh2_recv () from /x01/nptsapp/current/libs/libssh2.so.1
#2  0x00007fd3c948bc01 in _libssh2_transport_read () from /x01/nptsapp/current/libs/libssh2.so.1
#3  0x00007fd3c946cfb1 in _libssh2_channel_read () from /x01/nptsapp/current/libs/libssh2.so.1
#4  0x00007fd3c94800fb in sftp_packet_read () from /x01/nptsapp/current/libs/libssh2.so.1
#5  0x00007fd3c94806bd in sftp_packet_require () from /x01/nptsapp/current/libs/libssh2.so.1
#6  0x00007fd3c9480fd1 in sftp_init () from /x01/nptsapp/current/libs/libssh2.so.1
#7  0x00007fd3c9481285 in libssh2_sftp_init () from /x01/nptsapp/current/libs/libssh2.so.1
Thanks,Ismail Aseen

  

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2016-03-23