[Bug 4057] New: ssh cannot be interrupted early after the connection / stuck in client_wait_until_can_do_something

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Mon Nov 16 13:53:21 AEDT 2026


https://bugzilla.mindrot.org/show_bug.cgi?id=4057

            Bug ID: 4057
           Summary: ssh cannot be interrupted early after the connection /
                    stuck in client_wait_until_can_do_something
           Product: Portable OpenSSH
           Version: 10.6p2
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: ssh
          Assignee: unassigned-bugs at mindrot.org
          Reporter: vincent-openssh at vinc17.net

Under Debian/unstable, when the server does not respond early after the
connection, it is not possible to interrupt ssh with the keyboard:
Ctrl-C, Ctrl-\, Ctrl-Z and the 3 keys "[Return]~." do not have any
effect.

A "ssh -vvv" gave:

debug1: OpenSSH_10.6p2 Debian-1, OpenSSL 3.6.5 29 Sep 2026
[...]
Authenticated to joooj.vinc17.net
([2001:4b99:1:3:216:3eff:fe20:ac98]:22) using "publickey".
debug3: channel 0: classify type "(null)" (no TTY) as interactive
debug3: channel 0: classify type "session" (no TTY) as bulk
debug1: channel 0: new session [client-session] (inactive timeout:
0.000000)
debug3: channel 0: classify type "session" (with TTY) as interactive
debug3: ssh_session2_open: channel_new: 0 (tty)
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting no-more-sessions at openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: filesystem
debug3: client_repledge: enter
debug2: client_loop: session QoS is now interactive
debug2: fd 3 setting TCP_NODELAY
debug3: set_sock_tos: set socket 3 IPV6_TCLASS 0xb8
debug3: send packet: type 80

At this point, neither Ctrl-C, Ctrl-\, Ctrl-Z, nor [Return]~. had any
effect.

Additional information:

qaa:~> strace -p 658788
strace: Process 658788 attached
ppoll([{fd=3, events=POLLIN}, {fd=3, events=0}], 2, {tv_sec=276,
tv_nsec=741470207}, [], 8

qaa:~> gdb -p 658788
[...]
(gdb) bt
#0  __internal_syscall_cancel (a1=<optimized out>, a2=<optimized out>,
    a3=<optimized out>, a4=<optimized out>, a5=a5 at entry=8,
a6=a6 at entry=0,
    nr=271) at ./nptl/cancellation.c:44
#1  0x00007f060b09ba1d in __syscall_cancel (a1=<optimized out>,
    a2=<optimized out>, a3=<optimized out>, a4=<optimized out>,
a5=a5 at entry=8,
    a6=a6 at entry=0, nr=271) at ./nptl/cancellation.c:75
#2  0x00007f060b11049e in __GI_ppoll (fds=<optimized out>,
    nfds=<optimized out>, timeout=<optimized out>,
    sigmask=sigmask at entry=0x7ffe5fb45a20)
    at ../sysdeps/unix/sysv/linux/ppoll.c:42
#3  0x000055e1c4e5807f in ppoll (__fds=<optimized out>,
__nfds=<optimized out>,
    __timeout=<optimized out>, __ss=0x7ffe5fb45a20)
    at /usr/include/x86_64-linux-gnu/bits/poll2.h:101
#4  client_wait_until_can_do_something (ssh=0x55e1c50351c0,
    pfdp=0x7ffe5fb45958, npfd_allocp=0x7ffe5fb45950,
    npfd_activep=0x7ffe5fb45954, channel_did_enqueue=<optimized out>,
    sigsetp=0x7ffe5fb45a20, conn_in_readyp=<synthetic pointer>,
    conn_out_readyp=<synthetic pointer>) at ../../clientloop.c:731
#5  client_loop (ssh=0x55e1c50351c0, have_pty=1,
    escape_char_arg=<optimized out>, ssh2_chan_id=<optimized out>)
    at ../../clientloop.c:1608
#6  0x000055e1c4e4610d in ssh_session2 (ssh=ssh at entry=0x55e1c50351c0,
    cinfo=cinfo at entry=0x55e1c50391d0) at ../../ssh.c:2349
#7  0x000055e1c4e4284b in main (ac=<optimized out>, av=<optimized out>)
    at ../../ssh.c:1834

I already had this issue with the OpenSSH_8.4p1 client in November
2020. The backtrace was also showing
client_wait_until_can_do_something.

This may be related to bug 3531, which seems to be similar to what I
get and is also about client_wait_until_can_do_something (except that
only SIGTERM is mentioned there). But this bug was fixed in 2024.

My bug report in the Debian BTS (in 2020 + new information):
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975104

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list