[Bug 2572] New: dead sessions aren't closed despite ClientAlive enabled

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Thu May 26 13:12:57 AEST 2016


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

            Bug ID: 2572
           Summary: dead sessions aren't closed despite ClientAlive
                    enabled
           Product: Portable OpenSSH
           Version: 3.7.1p2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P5
         Component: sshd
          Assignee: unassigned-bugs at mindrot.org
          Reporter: calestyo at scientia.net

Hi.

I'm experiencing the following every now and then:
A ssh session somehow gets stuck and never gets closed despite
ClientAlive messages being enabled.

Unfortunately I do not know how to reproduce it, nor did I found any
other indicative log messages or so.
It happens with the Debian sid version of ssh, but I think I experience
it since 6.9 (I think it wasn't happening in 6.8) - but maybe I mix
things up here.
systemd is used sshd run in daemon mode.

I have amongst other the following set in sshd_config:
ClientAliveInterval     15
ClientAliveCountMax     8
TCPKeepAlive    no

AFAIU, ClientAlive messages should do more or less the same just not on
the TCP level but within the encrypted SSH connection. So if that is
gone and the client doesn't reply anymore, I'd expect sshd to kill the
connection.

A current example shows me:
# w
 05:08:19 up 2 days,  5:19,  3 users,  load average: 0,00, 0,05, 0,05
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/0    141.[snipsnap]   Tue14   39:08m  0.23s  0.23s -bash
root     pts/1    142.[snipsnap]   Tue14   38:04m  0.23s  0.23s -bash
root     pts/2    2001:[snipsnap]  01:36    1.00s  0.34s  0.00s w

The ones on pts 0 and 1 are dead (they were made from the same laptop
that makes the connection to 2, just from another network, and the
laptop has been rebooted several times since then.


# netstat --inet --inet6 -pn | grep ssh
tcp        0      0 85.[snipsnap]:22        141.[snipsnap]:34016    
ESTABLISHED 15847/sshd: root at pt 
tcp        0      0 85.[snipsnap]:22        142.[snipsnap]:51726    
ESTABLISHED 17000/sshd: root at pt 
tcp6       0    276 2a01:[snipsnap]:46538 ESTABLISHED 29362/sshd:
root at pt 

interestingly, the kernel doesn't kill of the connections either,
despite them being definitely gone


Any ideas how to further debug that?

Thanks,
Chris.

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


More information about the openssh-bugs mailing list