Subject: [libssh2] #270: libssh2_sftp_stat_ex hanged

[libssh2] #270: libssh2_sftp_stat_ex hanged

From: libssh2 Trac <>
Date: Thu, 05 Sep 2013 17:35:12 -0000

#270: libssh2_sftp_stat_ex hanged
 Reporter: ganga bhavani | Owner:
     Type: defect | Status: new
 Priority: high | Milestone: 1.4.3
Component: SFTP | Version: 1.2.9
 Keywords: | Blocked By:
   Blocks: |
 We are using libssh2 protocol to initiate SFTP transfer while sending
 files to remote server.
 In stability tests where traffic is flowing we observed that one file got
 stuck in sending.

 At this point, we have collected the gstack and observed that the hang is
 there in libssh2_sftp_stat_ex API as shown below

 Thread 5 (Thread 0x7f5c6bff7700 (LWP 29770)):
 #0 0x00007f5c7a2c0786 in poll () from /lib64/
 #1 0x00007f5c7abf81f7 in ?? () from /usr/lib64/
 #2 0x00007f5c7abfb9b2 in libssh2_sftp_stat_ex () from
 #3 0x00000000004f4fc9 in SftpAdapterClass::sendFile1(void*, std::string,
 std::string, bool) ()

 The libssh2 library we are using here is libssh2-1-1.2.9-

 Please help me in analyzing what could be the reason for
 "libssh2_sftp_stat_ex " to get hang.

 In the "Feature update for libssh2" for this libssh2-1-1.2.9-
 release , it is written

 "In addition to that some problems were fixed, including a
  possible application hang when waiting for a remote server
  to return the results of a command."

 So we feel that hangs occurred while using some of the libssh2 API's are
 addressed in this release.

 So can you let us know whether the hang in "libssh2_sftp_stat_ex " is
 addressed in libssh2-1-1.2.9- release.
 Or is there any other later release which has fixed up the hangs that are
 occurring in libssh2 API calls.

 Thanking you in Advance.

Ticket URL: <>
libssh2 <>
C library for writing portable SSH2 clients
Received on 2013-09-05