Subject: Re: [libssh2] #205: "Error waiting for FXP_READ ACK" during large download on Windows

Re: [libssh2] #205: "Error waiting for FXP_READ ACK" during large download on Windows

From: libssh2 Trac <trac_at_libssh2.stuge.se>
Date: Thu, 30 Dec 2010 18:30:54 -0000

#205: "Error waiting for FXP_READ ACK" during large download on Windows
------------------------+---------------------------------------------------
  Reporter: riordanmr | Owner:
      Type: defect | Status: new
  Priority: normal | Milestone: 1.2.8
 Component: API | Version: 1.2.7
Resolution: | Keywords:
    Blocks: | Blocked By:
------------------------+---------------------------------------------------

Comment (by riordanmr):

 1. While trying to reproduce this with the debugger running, I finally
 did catch the program at sftp.c:sftp_packet_read:
  if (packet_len > LIBSSH2_SFTP_PACKET_MAXLEN)
 return _libssh2_error(session,
 LIBSSH2_ERROR_CHANNEL_PACKET_EXCEEDED,
 "SFTP packet too large");
 call stack:
> sftp2small.exe!sftp_packet_read(_LIBSSH2_SFTP * sftp=0x00a0e4b0) Line
 210 C
 sftp2small.exe!sftp_packet_requirev(_LIBSSH2_SFTP * sftp=0x00a0e4b0, int
 num_valid_responses=2, const unsigned char * valid_responses=0x0049898c,
 unsigned int request_id=22733, unsigned char * * data=0x0011f750, unsigned
 int * data_len=0x0011f744) Line 403 + 0x9 bytes C
 sftp2small.exe!sftp_read(_LIBSSH2_SFTP_HANDLE * handle=0x00a0f028, char *
 buffer=0x0011fa88, unsigned int buffer_size=65536) Line 1198 + 0x25 bytes
 C
 sftp2small.exe!libssh2_sftp_read(_LIBSSH2_SFTP_HANDLE * hnd=0x00a0f028,
 char * buffer=0x0011fa88, unsigned int buffer_maxlen=65536) Line 1305 +
 0x11 bytes C

 Here's a dump of some variables. sftp->partial_size looks bad. The
 server is running OpenSSH. It's the same, unmodified server that I've
 been using for months now, so I doubt it's returning a bogus response.

 ? packet
 0xcccccccc <Bad Ptr>
 ? rc
 4
 ? packet_len
 1728053336
 ? sftp
 0x00a0e4b0 {channel=0x003bead0 request_id=22799 version=3 ...}
 channel: 0x003bead0 {node={...} channel_type=0x00a0f5a8
 "sessionýýýý««««««««þîþîþ" channel_type_len=7 ...}
 request_id: 22799
 version: 3
 packets: {last=0x00000000 first=0x00000000 }
 sftp_handles: {last=0x00a0f028 first=0x00a0f028 }
 last_errno: 0
 partial_size: 0x00a0e4d0 "g"
 partial_size_len: 4
 partial_packet: 0x00000000 <Bad Ptr>
 partial_len: 2009
 partial_received: 687
 requirev_start: 1293733037
 open_state: libssh2_NB_state_idle
 open_packet: 0x00000000 <Bad Ptr>
 open_packet_len: 39
 open_packet_sent: 39
 open_request_id: 0
 read_state: libssh2_NB_state_idle
 read_packet: 0x00000000 <Bad Ptr>
 read_request_id: 0
 read_total_read: 0
 readdir_state: libssh2_NB_state_idle
 readdir_packet: 0x00000000 <Bad Ptr>
 readdir_request_id: 0
 fstat_state: libssh2_NB_state_idle
 fstat_packet: 0x00000000 <Bad Ptr>
 fstat_request_id: 0
 unlink_state: libssh2_NB_state_idle
 unlink_packet: 0x00000000 <Bad Ptr>
 unlink_request_id: 0
 rename_state: libssh2_NB_state_idle
 rename_packet: 0x00000000 <Bad Ptr>
 rename_s: 0x00000000 <Bad Ptr>
 rename_request_id: 0
 fstatvfs_state: libssh2_NB_state_idle
 fstatvfs_packet: 0x00000000 <Bad Ptr>
 fstatvfs_request_id: 0
 statvfs_state: libssh2_NB_state_idle
 statvfs_packet: 0x00000000 <Bad Ptr>
 statvfs_request_id: 0
 mkdir_state: libssh2_NB_state_idle
 mkdir_packet: 0x00000000 <Bad Ptr>
 mkdir_request_id: 0
 rmdir_state: libssh2_NB_state_idle
 rmdir_packet: 0x00000000 <Bad Ptr>
 rmdir_request_id: 0
 stat_state: libssh2_NB_state_idle
 stat_packet: 0x00000000 <Bad Ptr>
 stat_request_id: 0
 symlink_state: libssh2_NB_state_idle
 symlink_packet: 0x00000000 <Bad Ptr>
 symlink_request_id: 0
 ? packet_received
 3435973836
 ? sftp->partial_size[0]
 103 'g'
 ? sftp->partial_size[1]
 0
 ? sftp->partial_size[2]
 0
 ? sftp->partial_size[3]
 88 'X'

 ------
 2. Also, I got the program to hang during the download (on Windows). The
 debugger reported that no user code was running; the last called user
 function was apparently libssh2_keepalive_send. This happened on two
 different runs.

-- 
Ticket URL: <http://trac.libssh2.org/ticket/205#comment:1>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-12-30