So I've been poking around and I have some more info, not sure if it helps as I'm still pretty clueless with the internals of libssh2 and ssh protocol itself.
So I'm testing this with a large GUI app, last attempt with sftp_write.c seemed to work fine, but not sure why. What seems to be happening is the server end is able to write 32k (the first write call, using 32k buffer) to disk, and after that nothing. Libssh2 keeps attempting to write data until the channel->local.window_size value reaches 0 then it stops. If the logging is lighter it often can block instead. I ran sshd in debug mode to get some logging, not 100% clear to me but seems like things might be closing early? or just failing to write. not sure if there's more debug info to be had or not. The will not send data after close repeats until I kill the application or the failure in libssh2 happens. I'm in irc as jfro if anybody wants to help debug. Thanks! debug1: subsystem: exec() /usr/libexec/sftp-server debug3: mm_audit_run_command entering command /usr/libexec/sftp-server debug3: mm_request_send entering: type 59 debug3: monitor_read: checking request 59 debug3: mm_answer_audit_command entering debug3: mm_request_receive entering debug2: fd 3 setting TCP_NODELAY debug2: fd 13 setting O_NONBLOCK debug2: fd 12 setting O_NONBLOCK debug2: channel 0: rcvd adjust 39321600 debug2: channel 0: window 1998619 sent adjust 98533 debug2: channel 0: read<=0 rfd 13 len 0 debug2: channel 0: read failed debug2: channel 0: close_read debug2: channel 0: input open -> drain debug2: channel 0: ibuf empty debug2: channel 0: send eof debug2: channel 0: input drain -> closed debug2: notify_done: reading debug1: Received SIGCHLD. debug1: session_by_pid: pid 7159 debug1: session_exit_message: session 0 channel 0 pid 7159 debug2: channel 0: request exit-status confirm 0 debug1: session_exit_message: release channel 0 debug2: channel 0: write failed debug2: channel 0: close_write debug2: channel 0: send eow debug2: channel 0: output open -> closed debug2: channel 0: send close debug3: channel 0: will not send data after close debug3: channel 0: will not send data after close debug3: channel 0: will not send data after close debug3: channel 0: will not send data after close debug3: channel 0: will not send data after close -- Jeremy Knope / Software Developer / Ambrosia Software, Inc. -- http://www.AmbrosiaSW.com/ _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
