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

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

From: Ismail Aseen <ismaildeh_at_yahoo.com>
Date: Tue, 22 Mar 2016 18:10:29 +0000 (UTC)

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-22