bugzilla-daemon at mindrot.org
2022-Jan-20 14:45 UTC
[Bug 3383] New: ssh can not exit when a command is running in backgroup
https://bugzilla.mindrot.org/show_bug.cgi?id=3383
Bug ID: 3383
Summary: ssh can not exit when a command is running in
backgroup
Product: Portable OpenSSH
Version: 8.8p1
Hardware: amd64
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: ssh
Assignee: unassigned-bugs at mindrot.org
Reporter: xylene2016 at gmail.com
Openssh version: 8.8p1-git2e5cfed513e84444483baf1d8b31c40072b05103
ssh -vv ip
#situation 1:
# hanging
[root at localhost ~]# sleep 30 >/dev/null 2>&1 & exit
[1] 15494
logout
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow at openssh.com reply
0
debug2: channel 0: rcvd eow
debug2: chan_shutdown_read: channel 0: (i0 o0 sock -1 wfd 4 efd 6
[write])
debug2: channel 0: input open -> closed
#situation 2:
# hanging
[root at localhost ~]# sleep 30 >/dev/null 2>&1 &
[1] 15556
[root at localhost ~]# exit
logout
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow at openssh.com reply
0
debug2: channel 0: rcvd eow
debug2: chan_shutdown_read: channel 0: (i0 o0 sock -1 wfd 4 efd 6
[write])
debug2: channel 0: input open -> closed
#situation 3:
# This is a normal exit
[root at localhost ~]# exit
logout
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: chan_shutdown_write: channel 0: (i0 o1 sock -1 wfd 5 efd 6
[write])
debug2: channel 0: output drain -> closed
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow at openssh.com reply
0
debug2: channel 0: rcvd eow
debug2: chan_shutdown_read: channel 0: (i0 o3 sock -1 wfd 4 efd 6
[write])
debug2: channel 0: input open -> closed
debug2: channel 0: rcvd close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
Connection to 45.77.159.33 closed.
Transferred: sent 2992, received 4408 bytes, in 6.0 seconds
Bytes per second: sent 500.1, received 736.8
debug1: Exit status 0
--
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2022-Jan-21 04:02 UTC
[Bug 3383] ssh can not exit when a command is running in backgroup
https://bugzilla.mindrot.org/show_bug.cgi?id=3383
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |djm at mindrot.org
--- Comment #1 from Damien Miller <djm at mindrot.org> ---
But it does exit after 30 seconds, right?
If so, then this is completely intentional. Use nohup if you want to
disown background processes.
--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2022-Jan-21 07:03 UTC
[Bug 3383] ssh can not exit when a command is running in backgroup
https://bugzilla.mindrot.org/show_bug.cgi?id=3383 --- Comment #2 from John <xylene2016 at gmail.com> --- commit 5c79952dfe1aa36105c93b3f383ce9be04dee384 upstream: prepare for conversion of ssh, sshd mainloop from>From this commit, ssh will be hanging.But before this commit, ssh will exit immediately. This conversion is not completed, not ready for use yet? -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2022-Jan-22 00:41 UTC
[Bug 3383] ssh can not exit when a command is running in backgroup
https://bugzilla.mindrot.org/show_bug.cgi?id=3383
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Blocks| |3353
--- Comment #3 from Damien Miller <djm at mindrot.org> ---
Thanks for finding the commit that caused this - it was a great help.
That commit accidentally disabled a hack for Linux to handle this
condition on sessions with ttys. I just pushed a fix in e204b343
Referenced Bugs:
https://bugzilla.mindrot.org/show_bug.cgi?id=3353
[Bug 3353] Tracking bug for openssh-8.9
--
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2022-Feb-25 02:56 UTC
[Bug 3383] ssh can not exit when a command is running in backgroup
https://bugzilla.mindrot.org/show_bug.cgi?id=3383
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--- Comment #4 from Damien Miller <djm at mindrot.org> ---
closing bugs resolved before openssh-8.9
--
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.