<div>Here is a new ssh suite that tests some of the functionality of ssh_connection.  It is based on the ssh_to_openssh_SUITE.  There are presently 2 failing test cases:</div><div><br></div><div>"big_cat" shows ssh_connection:send() behaving asynchronously for large sends.  This is the issue I was talking about earlier in this thread.</div>
<div><br></div><div>"send_after_exit" shows that ssh_connection:send() does not report an appropriate {error, closed} if send() is attempted after a channel is closed.  I have a use case in my project that really needs a proper {error, closed}.</div>
<div><br></div><div>I will start working on fixes for both of these. (Oops, just saw your patch.  I will give it a try.)</div><div><br></div><div>Cheers,</div><div>Dan.</div><div><br></div>git fetch git@github.com:goertzenator/otp.git ssh_connection_suite<div>
<a href="https://github.com/goertzenator/otp/compare/ssh_connection_suite">https://github.com/goertzenator/otp/compare/ssh_connection_suite</a></div><div><a href="https://github.com/goertzenator/otp/compare/ssh_connection_suite.patch">https://github.com/goertzenator/otp/compare/ssh_connection_suite.patch</a></div>
<div><br></div><br><div class="gmail_quote">On Thu, Aug 30, 2012 at 2:27 AM, Ingela Anderton Andin <span dir="ltr"><<a href="mailto:ingela.anderton.andin@ericsson.com" target="_blank">ingela.anderton.andin@ericsson.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi!<div class="im"><br>
<br>
Daniel Goertzen wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
After looking through the SSH code and learning more about it, I feel this patch is solving the wrong problem.  The REAL problem is that ssh_connection:send() is supposed to be synchronous, but is actually not in some cases.<br>

<br>
send() will be synchronous only if the given data will fit in the channel send window.  Any data beyond that will be sent asynchronously.  So if you send a very large binary, or repeatedly send smaller binaries you will run into this problem.<br>

<br>
The minimum ssh packet size mandated by the RFCs is 32kB, so the minimum window is the same.  OpenSSH gives me a send window of approx 200kB.  For most of the applications that people use SSH for, the send window never gets overrun and you never see asynchronous send behavior out of Erlang SSH.<br>

<br>
Ingela, I'm inclined to write some failing test cases for this and some other problems I've seen.  Would this be helpful? I have some ideas about how to fix the problems, but I may not have time to actually fix them.<br>

<br>
</blockquote>
<br></div>
Yes it would be helpful. Then I  will not include your patch.   The remote id fix is already added. And we can investigate this other problem further I may need to refresh my ssh<br>
RFC knowledge too.<br>
<br>
Regards Ingela Erlang/OTP team - Ericsson AB<br>
<br>
<br>
</blockquote></div><br>