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: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org 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.