Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1377987

Summary: gdm.service failed after user logout
Product: Red Hat Enterprise Linux 7 Reporter: Jiri Koten <jkoten>
Component: gdmAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 7.3CC: jkoten, lmiksik, tpelka, vbenes
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gdm-3.14.2-19.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 06:40:24 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:
Attachments:
Description Flags
gdm log none

Description Jiri Koten 2016-09-21 09:07:11 UTC
Description of problem:
I had two user sessions running and logout one of the users, gdm.service entered failed state and restarted itself which also brought down the remaining user session.

Version-Release number of selected component (if applicable):
gdm-3.14.2-18.el7
systemd-219-30.el7
gnome-shell-3.14.4-53.el7

How reproducible:
100%

Steps to Reproduce:
1. Login user1
2. Switch user
3. Login user2
4. Logout

Actual results:
The greeter is shown, but the user1 is not highlighted - based on the journal it lost connection to X. After login user1 I got switched to screen lock immediately and have to type the password again and unlock the screen. There is a new user1 session, i.e. I lost all the running programs. 

Expected results:
After user1 login I'm back at the previous session.

Additional info:

Comment 1 Jiri Koten 2016-09-21 09:09:28 UTC
Created attachment 1203185 [details]
gdm log

[snip]
X Error of failed request:  BadValue (integer parameter out of range for operation)
Major opcode of failed request:  113 (X_KillClient)
Value in failed request:  0x800000
Serial number of failed request:  25
Current serial number in output stream:  278
gdm.service: main process exited, code=exited, status=1/FAILURE
Process exit status: 0

...
Unit gdm.service entered failed state.
Triggering OnFailure= dependencies of gdm.service.
gdm.service failed.
gdm.service holdoff time over, scheduling restart.
Starting GNOME Display Manager...

Comment 2 Jiri Koten 2016-09-21 12:22:57 UTC
Regression was introduced in gdm-3.14.2-18.el7.

Comment 3 Ray Strode [halfline] 2016-09-21 14:32:43 UTC
Not really sure what happened here… on my local branch I have:

+                gdm_error_trap_push ();
+
+                /* Kill every client but ourselves, then close our own connection
+                 */
+                for (client = 0;
+                     client <= highest_client;
+                     client += client_increment) {
+
+                        if (client != setup->resource_id_base)
+                                XKillClient (slave->priv->server_display, client);
+                }
+
+                XCloseDisplay (slave->priv->server_display);
+                gdm_error_trap_pop ();


but on the branch I committed i have:

+                /* Kill every client but ourselves, then close our own connection
+                 */
+                for (client = 0;
+                     client <= highest_client;
+                     client += client_increment) {
+
+                        if (client != setup->resource_id_base)
+                                XKillClient (slave->priv->server_display, client);
+                }
+
+                XCloseDisplay (slave->priv->server_display);


Note the missing error_trap_push/pop calls. I don't really understand how they fell out of the patch, but I clearly bungled it somehow

Comment 6 Jiri Koten 2016-09-21 15:42:46 UTC
The issue is fixed.

Comment 8 errata-xmlrpc 2016-11-04 06:40:24 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://rhn.redhat.com/errata/RHBA-2016-2451.html