sshd-ConsoleKit integration patch causes abrupt termination of multichannel sessions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Trusty |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Attached to this report is a small app the reproduces the issue by creating multiple channels within one sessions. (I fist hit this issue using JSCH library)
Following information is printed to stdout if sshd is launched with -d flags (I've modified the sshd code to print PIDs next to debug level):
debug3(7526): monitor_read: checking request 156
debug3(7526): mm_answer_
debug1(7526): session_by_tty: session 0 tty /dev/pts/1
debug1(7573): server_
debug1(7573): session_by_channel: session 2 channel 2
debug1(7573): session_
debug1(7573): Allocating pty.
debug3(7573): mm_request_send entering: type 28
debug3(7573): mm_pty_allocate: waiting for MONITOR_ANS_PTY
debug3(7573): mm_request_
debug3(7573): mm_request_receive entering
debug1(7526): Unable to open session: The name org.freedesktop
debug3(7526): mm_request_send entering: type 157
debug3(7526): mm_request_receive entering
debug3(7526): monitor_read: checking request 28
debug3(7526): mm_answer_pty entering
debug2(7526): session_new: allocate (allocated 2 max 10)
debug3(7526): session_unused: session id 2 unused
debug1(7526): session_new: session 2
mm_request_
From the log, it looks as if two processes use the same set of pipes to communicate to the monitor, one of them is sending MONITOR_
I can reproduce the failure 90% of time using attached app, which expects first argument to be host name, second - login and the third - password, that are defaulted to ubuntu:
$ ./ssh-multisession
Connecting to localhost...Done!
Authenticating as ubuntu...Done.
Starting channel 0
Starting channel 1
ssh_channel_
Starting channel 2
ssh_channel_
Starting channel 3
The same script works fine if sshd is compiled without consolekit.patch:
./ssh-multisession debian-host debian debian
Connecting to 172.17.
Authenticating as debian...Done.
Starting channel 0
Starting channel 1
Starting channel 2
Starting channel 3
Starting channel 4
Starting channel 5
Starting channel 6
Starting channel 7
Starting channel 8
Starting channel 9
P.S. To compile a test app one needs to have libssh-dev package installed on your system.
Changed in openssh (Ubuntu Trusty): | |
status: | Confirmed → Triaged |
tags: | added: server-next |
Changed in openssh (Ubuntu): | |
assignee: | Colin Watson (cjwatson) → nobody |
Changed in openssh (Ubuntu Trusty): | |
status: | Triaged → Won't Fix |
tags: | removed: server-next |
Status changed to 'Confirmed' because the bug affects multiple users.