Bug 1888159 - ssh x11 connection is not closed when exiting gnome-terminal
Summary: ssh x11 connection is not closed when exiting gnome-terminal
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: dbus
Version: 7.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: David King
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-14 08:59 UTC by Yuki Okada
Modified: 2021-05-26 12:17 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-26 12:17:07 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Yuki Okada 2020-10-14 08:59:17 UTC
Description of problem:
- ssh x11 connection hangs (Terminal prompt does NOT return) if launching and exiting gnome-terminal via ssh x11 forwarding.
- The prompt returns only after pressing Ctrl+C.
- Last part of ssh -vvv debug log is like below. It appears some open connections remain undeleted.

  debug3: channel 4: status: The following connections are open:
    #2 x11 (t4 r4 i0/0 o0/0 fd 8/8 cc -1)
    #3 x11 (t4 r5 i0/0 o0/0 fd 9/9 cc -1)
    #4 x11 (t4 r6 i3/0 o3/0 fd 10/10 cc -1)
    #5 x11 (t4 r7 i0/0 o0/0 fd 11/11 cc -1)
  
  debug2: channel 5: rcvd adjust 33464
  debug3: send packet: type 1
  debug1: channel 2: free: x11, nchannels 3
  debug3: channel 2: status: The following connections are open:
    #2 x11 (t4 r4 i0/0 o0/0 fd 8/8 cc -1)
    #3 x11 (t4 r5 i0/0 o0/0 fd 9/9 cc -1)
    #5 x11 (t4 r7 i0/0 o0/0 fd 11/11 cc -1)
  
  debug1: channel 3: free: x11, nchannels 2
  debug3: channel 3: status: The following connections are open:
    #3 x11 (t4 r5 i0/0 o0/0 fd 9/9 cc -1)
    #5 x11 (t4 r7 i0/0 o0/0 fd 11/11 cc -1)
  
  debug1: channel 5: free: x11, nchannels 1
  debug3: channel 5: status: The following connections are open:
    #5 x11 (t4 r7 i0/0 o0/0 fd 11/11 cc -1)
  
  debug1: fd 2 clearing O_NONBLOCK
  Killed by signal 2.

Version-Release number of selected component (if applicable):
dbus-1.10.24-15.el7
openssh-7.4p1-21.el7
gnome-terminal-3.28.2-3.el7

How reproducible:
100%

Steps to Reproduce:
1. Run "ssh -X <remote hostname/ipaddress> gnome-terminal" in gnome-terminal
2. Run "exit" in gnome-terminal launched by ssh x11 forwarding
3. ssh connection hangs (The prompt does not return)

Actual results:
ssh connection hangs (prompt does NOT return)

Expected results:
ssh connection does not hang (prompt returns immediately)

Additional info:
- Similar issue was reported in BZ#1112339, and fixed in dbus-1.10.24-1.el7. But our issue occurs in dbus-1.10.24-15.el7.
- The issue is not reproduced (Prompt returns immediately) when using xterm instead of gnome-terminal like below.

  $ ssh -X <remote hostname/ipaddress> xterm

- When running "ssh -X <hostname/ip> gnome-terminal" between 2 RHEL8 servers, gnome-terminal is displayed in "remote" server (not in the "local" server where ssh -X is run). If you run the following, gnome-terminal is displayed in "local" server, and the issue is also reproducible (prompt does not return).

  $ ssh -X <remote hostname/ipaddress> 'dbus-launch --exit-with-session gnome-terminal'


Note You need to log in before you can comment on or make changes to this bug.