https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42597

            Bug ID: 42597
           Summary: Pass SSH-level timeouts to SFTP file transport
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

Koha::File::Transport::SFTP constructs Net::SFTP::Foreign with timeout =>
DEFAULT_TIMEOUT ( currently hard coded to 10 seconds ), which only governs
per-I/O reads from the underlying ssh child. It does not bound the SSH protocol
handshake.

When a remote sshd accepts the TCP connection but stalls during key exchange,
ssh sits in tcp_recvmsg waiting for the next handshake message and the Perl
parent waits with it but the module timeout never fires because no I/O is
happening. It just sits forever.

An strace of a process in this state looks like:
  select(16, [9], NULL, NULL, {tv_sec=0, tv_usec=119055}) = 0 (Timeout)
  wait4(59926, 0x7ffe587503e4, WNOHANG, NULL) = 0
  select(16, [9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
  wait4(59926, 0x7ffe587503e4, WNOHANG, NULL) = 0
  select(16, [9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
  wait4(59926, 0x7ffe587503e4, WNOHANG, NULL) = 0
  select(16, [9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
  wait4(59926, 0x7ffe587503e4, WNOHANG, NULL) = 0
  select(16, [9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
  wait4(59926, 0x7ffe587503e4, WNOHANG, NULL) = 0
  select(16, [9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
  wait4(59926, 0x7ffe587503e4, WNOHANG, NULL) = 0
  select(16, [9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
  wait4(59926, 0x7ffe587503e4, WNOHANG, NULL) = 0
  select(16, [9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
  wait4(59926, 0x7ffe587503e4, WNOHANG, NULL) = 0
  select(16, [9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
  wait4(59926, 0x7ffe587503e4, WNOHANG, NULL) = 0
  select(16, [9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
  wait4(59926, 0x7ffe587503e4, WNOHANG, NULL) = 0
  select(16, [9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
  wait4(59926, 0x7ffe587503e4, WNOHANG, NULL) = 0
  select(16, [9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
  wait4(59926, 0x7ffe587503e4, WNOHANG, NULL) = 0

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to