sftp_write waits infinitely when connection to target server is lost
Open, NormalPublic

Description

In blocking mode sftp//write will wait (poll) infinitely, when connection to target server is lost.

To reproduce you need two computers:

  • Transfer a large file from computer A to computer B using sftp//write.
  • During the transfer unplug the network cable from computer B. -> computer A will infinitely poll
  • After 20 minutes or so plug network cable of computer B -> computer A will still poll infinitely!

The infinite poll is cause by some codelines:

int ssh_channel_read(ssh_channel channel, void **dest, uint32_t count, int is_stderr)
{
    return ssh_channel_read_timeout(channel, dest, count, is_stderr, -1);
}
if (timeout < 0) {
      timeout = SSH_TIMEOUT_DEFAULT;
}

For more information and a patch please see my mailing list post:
http://www.libssh.org/archive/libssh/2016-02/0000006.html

migration created this object with visibility "Restricted Project (Project)".
migration created this object with edit policy "Restricted Project (Project)".
asn updated the task description. (Show Details)Aug 17 2017, 3:10 PM
asn updated the task description. (Show Details)
asn changed the visibility from "Restricted Project (Project)" to "Public (No Login Required)".