Bug 1489977
Summary: | Switching users in GNOME session is starting new X servers for the user, and a user logout is making it unusable. | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | amit yadav <ayadav> | ||||||||||||||||||||
Component: | gnome-session | Assignee: | Ray Strode [halfline] <rstrode> | ||||||||||||||||||||
Status: | CLOSED ERRATA | QA Contact: | Desktop QE <desktop-qa-list> | ||||||||||||||||||||
Severity: | high | Docs Contact: | |||||||||||||||||||||
Priority: | high | ||||||||||||||||||||||
Version: | 7.4 | CC: | amike, ayadav, bgollahe, chorn, jkoten, mkrajnak, rstrode, salmy, toneata, tpelka, yoguma, yzheng | ||||||||||||||||||||
Target Milestone: | rc | Keywords: | ZStream | ||||||||||||||||||||
Target Release: | --- | ||||||||||||||||||||||
Hardware: | All | ||||||||||||||||||||||
OS: | Linux | ||||||||||||||||||||||
Whiteboard: | |||||||||||||||||||||||
Fixed In Version: | gdm-3.28.2-7.el7 | Doc Type: | If docs needed, set a value | ||||||||||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||||||||||
Clone Of: | |||||||||||||||||||||||
: | 1588877 1635747 1636460 1636519 (view as bug list) | Environment: | |||||||||||||||||||||
Last Closed: | 2019-08-06 12:37:16 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: | 1571842, 1588877, 1597339, 1607454, 1632807, 1635747, 1636460, 1636519, 1640918, 1649362, 1707454 | ||||||||||||||||||||||
Attachments: |
|
Description
amit yadav
2017-09-08 21:17:17 UTC
should hopefully work better with gdm-3.28.2-7.el7 Created attachment 1487830 [details]
Xorg.0.log
Created attachment 1487831 [details]
journalctl logs
Created attachment 1487982 [details]
Xorg.0.log.old
Created attachment 1487983 [details]
Xorg.1.log
Created attachment 1487984 [details]
Xorg.1.log.old
Created attachment 1487985 [details]
Xorg.2.log
Created attachment 1490121 [details] qxl driver fix So, this doesn't seem to be a duplicate of bug 1632807 after all. I instrumented the kernel to highlight when master was getting dropped and set and we were clearly failing to call drop master in the existing X server before doing set master in the switched X server. master ownership is important for being able to set the screen resolution and display contents on screen. The problem is that when the X server is killed it does a VT switch back to the VT it was started from. Normally switching to another VT leads to master getting dropped, but in this termination case, they don't, since the event loop is finished before the VT switch is initiated. Most drivers workaround this problem by having this sort of code in their CloseScreen hook: if (pScrn->LeaveVT) pScrn->LeaveVT (...); This LeaveVT call, simulates the leave vt event that would come in if the event loop were still active. I say most drivers, but not all. The QXL driver fails to implement this workaround. The above patch fixes the issue for me. Doing a quick search, though, the vmware driver also fails to call LeaveVT from CloseScreen, so I think, maybe, a better approach would be to call the LeaveVT hook from somewhere more generic like xf86CrtcCloseScreen or maybe a new xf86 ddx CloseScreen hook. btw, i think we should move this bug back to VERIFIED, and clone for the qxl issue, since it really is separate, so I'll do that shortly. Okay i've filed bug 1635747 to cover the xserver/qxl issue. Reproducer: 1) Login user1 2) Switch and login user2 3) Switch and login user3 4) Switch and unlock user1 5) Logout user1 6) Login user2 7) Logout user2 After that no greeter session is started and I ended in console tty2. Switching to VT1 didn't trigger the greeter session either, I have to go to user3 session (VT3) and switch user to get the greeter. Created attachment 1490619 [details]
gdm journal
Tested on RC compose: kernel-3.10.0-954.el7 gdm-3.28.2-9.el7 xorg-x11-server-Xorg-1.20.1-3.el7 No crash of Xorg happend. okay filtering the log a little: > Oct 04 16:58:36 hal gdm[5481]: GdmSession: Emitting 'session-opened' signal > Oct 04 16:58:36 hal gdm[5481]: GdmDisplay: session id: c1 > Oct 04 16:58:36 hal gdm[5481]: GdmSession: Emitting 'session-started' signal with pid '5627' first login screen started > Oct 04 16:58:41 hal gdm-password][6130]: GdmSessionWorker: queuing setup for user: test (null) > Oct 04 16:58:46 hal gdm[5481]: GdmSession: Emitting 'session-opened' signal > Oct 04 16:58:48 hal gdm[5481]: GdmDisplay: session id: 1 > Oct 04 16:58:48 hal gdm[5481]: GdmSession: Emitting 'session-started' signal with pid '6173' user1 logged in > Oct 04 17:01:06 hal gdm[5481]: GdmSession: Emitting 'session-opened' signal > Oct 04 17:01:06 hal gdm[5481]: GdmDisplay: session id: c2 > Oct 04 17:01:06 hal gdm[5481]: GdmSession: Emitting 'session-started' signal with pid '8270' second login screen started > Oct 04 17:01:14 hal gdm-password][8595]: GdmSessionWorker: queuing setup for user: test67 (null) > Oct 04 17:01:14 hal gdm[5481]: using ut_pid 8596 > Oct 04 17:01:16 hal gdm[5481]: GdmSession: Emitting 'session-opened' signal > Oct 04 17:01:25 hal gdm[5481]: GdmDisplay: session id: 6 > Oct 04 17:01:25 hal gdm[5481]: GdmSession: Emitting 'session-started' signal with pid '8668' user2 logged in > Oct 04 17:01:45 hal gdm[5481]: GdmSession: Emitting 'session-opened' signal > Oct 04 17:01:45 hal gdm[5481]: GdmDisplay: session id: c3 > Oct 04 17:01:45 hal gdm[5481]: GdmSession: Emitting 'session-started' signal with pid '9495' third login screen started > Oct 04 17:02:02 hal gdm[5481]: GdmSession: Emitting 'reauthenticated' signal > Oct 04 17:02:03 hal gdm[5481]: GdmServer: Server died third login screen finished > Oct 04 17:02:03 hal gdm[5481]: Unlocking session 1 user1 unlocked > Oct 04 17:02:33 hal gdm[5481]: Writing logout record > Oct 04 17:02:33 hal gdm[5481]: using ut_pid 6173 > Oct 04 17:02:33 hal gdm[5481]: GdmServer: Server died user1 logged out > Oct 04 17:02:34 hal gdm[5481]: GdmSession: Emitting 'session-opened' signal > Oct 04 17:02:34 hal gdm[5481]: GdmDisplay: session id: c4 > Oct 04 17:02:34 hal gdm[5481]: GdmSession: Emitting 'session-started' signal with pid '10396' fourth login screen started > Oct 04 17:02:42 hal gdm[5481]: GdmSession: Emitting 'reauthenticated' signal > Oct 04 17:02:43 hal gdm[5481]: GdmServer: Server died fourth login screen finished > Oct 04 17:02:43 hal gdm[5481]: Unlocking session 6 user2 unlocked > Oct 04 17:03:18 hal gdm[5481]: Writing logout record > Oct 04 17:03:18 hal gdm[5481]: using ut_pid 8668 > Oct 04 17:03:18 hal gdm[5481]: GdmServer: Server died user2 logged out > Oct 04 17:03:19 hal gdm[5481]: GdmSession: Emitting 'session-opened' signal > Oct 04 17:03:19 hal gdm[5481]: GdmDisplay: session id: c5 > Oct 04 17:03:19 hal gdm[5481]: GdmSession: Emitting 'session-started' signal with pid '11009' fifth login screen started > Oct 04 17:03:30 hal gdm-password][11296]: GdmSessionWorker: queuing setup for user: test (null) > Oct 04 17:03:34 hal gdm[5481]: GdmSession: Emitting 'session-opened' signal > Oct 04 17:03:36 hal gdm[5481]: GdmDisplay: session id: 7 > Oct 04 17:03:36 hal gdm[5481]: GdmSession: Emitting 'session-started' signal with pid '11334' user1 logged in again > Oct 04 17:04:04 hal gdm[5481]: GdmSession: Emitting 'session-opened' signal > Oct 04 17:04:04 hal gdm[5481]: GdmDisplay: session id: c6 > Oct 04 17:04:04 hal gdm[5481]: GdmSession: Emitting 'session-started' signal with pid '12410' sixth login screen started > Oct 04 17:04:09 hal gdm-password][12699]: GdmSessionWorker: queuing setup for user: test67 (null) > Oct 04 17:04:11 hal gdm[5481]: GdmSession: Emitting 'session-opened' signal > Oct 04 17:04:14 hal gdm[5481]: GdmDisplay: session id: 8 > Oct 04 17:04:14 hal gdm[5481]: GdmSession: Emitting 'session-started' signal with pid '12737' user2 logged in again > Oct 04 17:04:25 hal gdm[5481]: GdmSession: Emitting 'session-opened' signal > Oct 04 17:04:25 hal gdm[5481]: GdmDisplay: session id: c7 > Oct 04 17:04:25 hal gdm[5481]: GdmSession: Emitting 'session-started' signal with pid '13457' seventh login screen started > Oct 04 17:04:34 hal gdm-password][13753]: GdmSessionWorker: queuing setup for user: gstest (null) > Oct 04 17:04:34 hal gdm[5481]: using ut_pid 13754 > Oct 04 17:04:37 hal gdm[5481]: GdmSession: Emitting 'session-opened' signal > Oct 04 17:04:45 hal gdm[5481]: GdmDisplay: session id: 9 > Oct 04 17:04:46 hal gdm[5481]: GdmSession: Emitting 'session-started' signal with pid '13810' user3 logged in > Oct 04 17:04:58 hal gdm[5481]: GdmSession: Emitting 'session-opened' signal > Oct 04 17:04:58 hal gdm[5481]: GdmDisplay: session id: c8 > Oct 04 17:04:58 hal gdm[5481]: GdmSession: Emitting 'session-started' signal with pid '14527' eigth login screen started > Oct 04 17:05:07 hal gdm[5481]: GdmSession: Emitting 'reauthenticated' signal > Oct 04 17:05:07 hal gdm[5481]: GdmServer: Server died eigth login screen finished > Oct 04 17:05:07 hal gdm[5481]: Unlocking session 7 user1 unlocked > Oct 04 17:05:23 hal gdm[5481]: Writing logout record > Oct 04 17:05:23 hal gdm[5481]: using ut_pid 11334 > Oct 04 17:05:23 hal gdm[5481]: GdmServer: Server died user1 logged out > Oct 04 17:05:24 hal gdm[5481]: GdmSession: Emitting 'session-opened' signal > Oct 04 17:05:24 hal gdm[5481]: GdmDisplay: session id: c9 > Oct 04 17:05:24 hal gdm[5481]: GdmSession: Emitting 'session-started' signal with pid '15343' ninth login screen started > Oct 04 17:05:37 hal gdm[5481]: GdmSession: Emitting 'reauthenticated' signal > Oct 04 17:05:37 hal gdm[5481]: GdmServer: Server died ninth login screen finished > Oct 04 17:05:37 hal gdm[5481]: Unlocking session 8 user2 unlocked > Oct 04 17:05:48 hal gdm[5481]: Writing logout record > Oct 04 17:05:48 hal gdm[5481]: using ut_pid 12737 > Oct 04 17:05:48 hal gdm[5481]: GdmServer: Server died user2 logged out at this point a login screen should get created, but it doesn't i think what's going on is we're hitting a race condition with logind potentially in this code in create_display: ``` ret = sd_seat_get_active (seat_id, &active_session_id, NULL);• • if (ret == 0) {• char *login_session_id = NULL;• • /* If we already have a login window, switch to it */• if (get_login_window_session_id (seat_id, &login_session_id)) {• if (g_strcmp0 (active_session_id, login_session_id) != 0) {• activate_session_id (factory, seat_id, login_session_id);• }• g_clear_pointer (&login_session_id, g_free);• g_clear_pointer (&active_session_id, g_free);• return NULL;• }• g_clear_pointer (&active_session_id, g_free);• } else {• /* Ensure we don't create the same display more than once */• display = gdm_display_store_find (store, lookup_by_seat_id, (gpointer) seat_id);• • if (display != NULL) {• return NULL;• }• }• ``` When user2 logs out the X server jumps back to user1's vt, but user1 is logged out, so it's blank. `sd_seat_get_active` is returning non-zero since there's no session on the active vt anymore, so we're falling into the non-seat0 `else` block inadvertently, and returning NULL without doing anything. we shouldn't be checking for whether or not the seat has an active session like that. it's apparently to avoid doing a full activation if we're already on the correct VT, but it's misplaced. Created attachment 1490684 [details]
this should fix it
(In reply to Ray Strode [halfline] from comment #44) > Created attachment 1490684 [details] > this should fix it I can confirm the fix worked for me. The login screen always starts when I switch user or logout. The only issue I have found is that sometimes when I unlock the user session the screen remains blank and I have to move mouse to wake up the screen. okay thats probably an unrelated issue in mutter. lets clone that for 7.7 ive cloned the remaining issue as bug 1636460 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/RHBA-2019:2044 |