- User Since
- Nov 9 2018, 10:26 PM (87 w, 1 d)
Dec 11 2018
Hi Andreas, the issue still persists. Looking at this commit: https://git.libssh.org/users/asn/libssh.git/commit/?h=master-poll&id=917ced39e0c8aaae4d2c22bcdbcb767f6355e62d
Dec 5 2018
The remaining issue is that the only time bsd_socket_compute_revents is called is when FD_ISSET(fds[i].fd, &readfds) returns true. However, with some instances of the application, FD_ISSET(fds[i].fd, &readfds) will consistently return false, resulting in the infinite loop since bsd_socket_compute_revents doesn't get called.
It's not clear to me why FD_ISSET() is needed. WSAGetLastError() does correctly return WSAECONNRESET.
Nov 29 2018
I think we are getting closer to fixing this issue. The timeout is correctly being propagated to the winsock select() function. WSAGetLastError() is returning WSAECONNRESET.
Nov 28 2018
Nov 27 2018
It looks like bsd_socket_disconnected() isn't even getting called.
Nov 26 2018
I pulled the latest master-poll and am no longer seeing a seg fault. However, I'm seeing the same infinite poll issue as before. It happens maybe 75% of the time.
Nov 21 2018
Thanks again for working with me on this issue.
Nov 20 2018
Thank you for your feedback Andreas. I have attached the updated patch.
Thanks for spending time on this Andreas.
Before the fix: On Windows, during a successful download, ssh_poll() returns > 0. When there is a disconnect that occurs in the middle of the download, ssh_poll() returns 0.
Thanks Andreas. I have attached an updated patch for the sftp.c file using sftp->session->opts.timeout instead of SSH_OPTIONS_TIMEOUT:
Nov 19 2018
See https://bugs.libssh.org/T47 for two patches that address part of this problem.
This is still occurring as of release 0.8.4. This issue is related: https://bugs.libssh.org/T33
Nov 13 2018
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.
Nov 9 2018
This is related to this issue discussed here: https://www.libssh.org/archive/libssh/2016-02/0000010.html