Bug 1377987 - gdm.service failed after user logout
Summary: gdm.service failed after user logout
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gdm
Version: 7.3
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Ray Strode [halfline]
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-21 09:07 UTC by Jiri Koten
Modified: 2016-11-04 06:40 UTC (History)
4 users (show)

Fixed In Version: gdm-3.14.2-19.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 06:40:24 UTC
Target Upstream Version:


Attachments (Terms of Use)
gdm log (131.77 KB, text/plain)
2016-09-21 09:09 UTC, Jiri Koten
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2451 0 normal SHIPPED_LIVE gdm bug fix and enhancement update 2016-11-03 14:04:05 UTC

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


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