After more hours of digging in the code, I isolated this to the two SFTP calls that cause this issue to be reproducible reliably. These are calls to ssh_channel_send_eof() and ssh_channel_free() from sftp_free() called from the cleanup of the first sftp. If I remove these two calls, the testsuite passes reproducibly.
Needs Triage (8)
Fri, Nov 16
Thu, Nov 15
Tue, Nov 13
I am seeing this issue with sftp_read(). The sftp_read() function call was getting hung when there was a disconnect. I traced it to ssh_channel_read() which isn't using the user defined timeout.
I have tested with 0.8.4. It looks like SSH_TIMEOUT_DEFAULT is always -1 even if I set SSH_OPTIONS_TIMEOUT.
Did you test this with libssh >= 0.8.3. Because I fixed some things.
Fri, Nov 9
This is related to this issue discussed here: https://www.libssh.org/archive/libssh/2016-02/0000010.html
Thu, Nov 8
Yes, I think that would be the correct fix.
Tue, Nov 6
options.c:610 in current master:
No, this issue is still present it I am right.
Probably not. I assume this is not only about configuration parser (which was fixed in several aspects recently), but instead about the way how the proxycommand is implemented in libssh (I am actually not sure how does it work there). The important are errors with ProxyCommand, but for further investigation, some debugging log will be needed:
Jabuk, is that working with the new config parsting stuff?
Fixed in libssh 0.8.1 or newer.
Jakub, didn't we already fix this?