[Libssh] Experiencing Issue with sftp_write Call
Fujiwara, Daisuke
DFujiwara at syncsort.com
Sat Oct 13 00:41:45 CEST 2007
Hello,
First of all, I would like to thank everyone who has contributed to this
great library.
I was hoping that I can get some help from people out there with this
particular problem I have been experiencing.
We are using the libssh version 0.11, and we have a call to the
sftp_write function given the length of data to write as 262173 bytes.
It seems that the libssh library writes 131035 bytes followed by 128037
bytes of data after appropriate remote window resizing.
However, the library then receives an EOF message from the server
instead of another window resizing message.
This is unexpected because we still have 3101 more bytes to write.
When this happens, the channel_write function gets stuck in the
while(channel->remote_window==0) in the channel_write function.
Because there are no more packets to be read from the server, our recv
call blocks.
I have attached the output from the libssh library below.
Please take a look at them and let me know if this is a known issue in
version 0.11 and whether the version 0.2 of the library has addressed
this particular problem.
Thank you,
Daisuke Fujiwara
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
growing window (channel 42:0) to 32000 bytes
sftp server version 3
Writing on the wire a packet having 37 bytes before,37 bytes after comp
+ 6 padd
ing bytes = 44 bytes packet
seq num = 11, len = 48
channel_write wrote 28 bytes
Decrypting 8 bytes data
size decrypted : 24
Read a 36 bytes packet
Decrypting 32 bytes data
9 bytes padding
Final size 26
type 94
Channel_handle(94)
adding 17 bytes data in 0
placing 17 bytes into channel buffer (stderr=0)
Writing on the wire a packet having 9 bytes before,9 bytes after comp +
10 padding bytes = 20 bytes packet
seq num = 12, len = 24
growing window (channel 42:0) to 32000 bytes
packet with id 1 type 102
queued msg type 1 id 102
dequeued msg id 1 type 102
Remote window is 131035 bytes. going to write 262173 bytes
Waiting for a growing window message...
Writing on the wire a packet having 131044 bytes before,131044 bytes
after comp
+ 7 padding bytes = 131052 bytes packet
seq num = 13, len = 131056
channel_write wrote 131035 bytes
Remote window is 0 bytes. going to write 131138 bytes
Waiting for a growing window message...
Decrypting 8 bytes data
size decrypted : 14
Read a 20 bytes packet
Decrypting 16 bytes data
10 bytes padding
Final size 9
type 93
Channel_handle(93)
Adding 128037 bytes to channel (42:0) (from 0 bytes)
Writing on the wire a packet having 128046 bytes before,128046 bytes
after comp
+ 5 padding bytes = 128052 bytes packet
seq num = 14, len = 128056
channel_write wrote 128037 bytes
Remote window is 0 bytes. going to write 3101 bytes
Waiting for a growing window message...
Decrypting 8 bytes data
size decrypted : c
Read a 12 bytes packet
Decrypting 8 bytes data
6 bytes padding
Final size 5
type 96
Channel_handle(96)
Received eof on channel (42:0)
Decrypting 8 bytes data
size decrypted : 24
Read a 36 bytes packet
Decrypting 32 bytes data
10 bytes padding
Final size 25
type 98
Channel_handle(98)
Decrypting 8 bytes data
size decrypted : c
Read a 12 bytes packet
Decrypting 8 bytes data
6 bytes padding
Final size 5
type 97
Channel_handle(97)
Received close on channel (42:0)
_____________________________________________________________________________
ATTENTION:
The information contained in this message (including any files transmitted
with this message) may contain proprietary, trade secret or other
confidential and/or legally privileged information. Any pricing
information contained in this message or in any files transmitted with
this message is always confidential and cannot be shared with any third
parties without prior written approval from Syncsort. This message is
intended to be read only by the individual or entity to whom it is
addressed or by their designee. If the reader of this message is not the
intended recipient, you are on notice that any use, disclosure, copying or
distribution of this message, in any form, is strictly prohibited. If you
have received this message in error, please immediately notify the sender
and/or Syncsort and destroy all copies of this message in your possession,
custody or control.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.cerkinfo.be/pipermail/libssh/attachments/20071012/aeabfe9f/attachment.htm
More information about the Libssh
mailing list