Bug 1680120

Summary: Killing inactive user causes active session to fail
Product: Red Hat Enterprise Linux 7 Reporter: Piyush Bhoot <pbhoot>
Component: xorg-x11-serverAssignee: Adam Jackson <ajax>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.7CC: alanm, mboisver, rstrode, yferszt
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: xorg-x11-server-1.20.4-6.el7 gdm-3.28.2-16.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1719361 (view as bug list) Environment:
Last Closed: 2019-08-06 12:42:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1719361    

Description Piyush Bhoot 2019-02-22 18:37:53 UTC
Description of problem:
Killing inactive session with 

loginctl kill-session

causes active user to fail.

Version-Release number of selected component (if applicable):
gdm-3.28.2-11.el7.x86_64.rpm
systemd-219-62.el7_6.5.x86_64.rpm

How reproducible:
Always


Steps to Reproduce:
1) RHEL system with installed GNOME desktop (default installation, no special settings) 
2) please ensure, that you have two users - lets say tom und ben
3) log in in the desktop environment as user tom
4) switch desktop user to the user ben (the session of the user tom becomes inactive and runs further in the background)
5) please list the desktop sessions now with the following command:

loginctl list-sessions

6) please kill now the inactive desktop session of the user tom (the active desktop user is ben, the session of the user tom runs in the background)

loginctl kill-session 2 (where 2 is the id of the now inactive session of the user tom)

Actual results:
Active session gets stopped

Expected results:
Active session remain unaffected

Additional info:
On side note: I have noticed ssh session as well failing, but not everytime

Comment 5 Ray Strode [halfline] 2019-05-06 20:55:58 UTC
I did a scratch build here: 

Task info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=21537234

with the above patch added.  didn't even need any backporting.

confirmed it fixes the problem.

mboisvert, can we get a qa ack?

Comment 9 Ray Strode [halfline] 2019-05-16 13:56:29 UTC
so this is actually going to need a GDM side fix too.

the problem is that GDM will start a new login scree when it detects the user session exiting, even if the user session exits in the background.

We need to add some code to handle the background death case.

When testing this before, I must have mixed up which session number I was killing, and killed a non-graphical session in the background (or something)

Comment 13 Michael Boisvert 2019-05-28 15:03:40 UTC
Verified on: xorg-x11-server-1.20.4-6.el7 and gdm-3.28.2-16.el7. With two sessions, I was able to kill the "inactive" session without any interruption.

Comment 22 errata-xmlrpc 2019-08-06 12:42:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:2079