After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 719418 - login screen stuck after switching users
login screen stuck after switching users
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
3.15.x
Other Linux
: High major
: ---
Assigned To: GDM maintainers
GDM maintainers
3.16
: 743554 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-11-27 13:37 UTC by Kamil Páral
Modified: 2015-03-17 16:41 UTC
See Also:
GNOME target: 3.16
GNOME version: ---


Attachments
system journal (196.58 KB, text/plain)
2013-11-27 13:37 UTC, Kamil Páral
  Details
gdm :0 (25.79 KB, text/plain)
2013-11-27 13:37 UTC, Kamil Páral
  Details
gdm :1 (23.05 KB, text/plain)
2013-11-27 13:38 UTC, Kamil Páral
  Details
gdm :2 (21.76 KB, text/plain)
2013-11-27 13:38 UTC, Kamil Páral
  Details
rpm -qa (45.92 KB, text/plain)
2013-11-27 13:38 UTC, Kamil Páral
  Details
bug demonstration video (1.19 MB, video/webm)
2015-01-22 14:02 UTC, Kamil Páral
  Details
rawhide - system journal (273.84 KB, text/plain)
2015-01-22 14:04 UTC, Kamil Páral
  Details
rawhide - rpm -qa (49.50 KB, text/plain)
2015-01-22 14:04 UTC, Kamil Páral
  Details
rawhide - gdm.pstack (1.70 KB, text/plain)
2015-01-22 14:05 UTC, Kamil Páral
  Details
rawhide - gdm-sessions-worker-gdm-launch-environment.pstack (1.35 KB, text/plain)
2015-01-22 14:05 UTC, Kamil Páral
  Details
rawhide - gnome-session-autostart-greeter.pstack (323 bytes, text/plain)
2015-01-22 14:05 UTC, Kamil Páral
  Details
rawhide - gnome-shell.pstack (5.97 KB, text/plain)
2015-01-22 14:06 UTC, Kamil Páral
  Details
rawhide - Xorg-display-2.pstack (1.62 KB, text/plain)
2015-01-22 14:06 UTC, Kamil Páral
  Details
manager: allow the login screen to do reauthentication (5.47 KB, patch)
2015-01-22 19:51 UTC, Ray Strode [halfline]
committed Details | Review
journal from rawhide VM (369.40 KB, text/plain)
2015-01-23 18:57 UTC, Kamil Páral
  Details
journal from bare metal F21 (256.77 KB, text/plain)
2015-01-23 18:58 UTC, Kamil Páral
  Details
manager: clean seed session when its display goes away (5.78 KB, patch)
2015-01-23 19:29 UTC, Ray Strode [halfline]
committed Details | Review
journal when mouse gets stuck (10.08 KB, text/plain)
2015-03-11 14:30 UTC, Kamil Páral
  Details
missing users in gdm (101.63 KB, image/jpeg)
2015-03-12 10:12 UTC, Kamil Páral
  Details
system journal when there are missing users in gdm (498.89 KB, text/plain)
2015-03-12 10:13 UTC, Kamil Páral
  Details
journal with gdm debug info (686.34 KB, text/plain)
2015-03-12 12:31 UTC, Kamil Páral
  Details
gdm: fix empty user list on user switching (3.40 KB, patch)
2015-03-16 11:41 UTC, Ray Strode [halfline]
accepted-commit_now Details | Review

Description Kamil Páral 2013-11-27 13:37:07 UTC
It's easy and reproducible (always in my case) to make login screen stuck and eat 100% cpu.

I have following users defined:
test (with password)
test2 (with password)
kparal (without password)

Reproducer:
* Log in as 'test'
* Switch user to 'test2'
* Switch user to 'test'
* Lock 'test's screen
* From the unlock dialog, hit "Log in as a different user"
* Log in as 'kparal'
* See only grey screen, see CPU eat 100%, nothing happening


Pstack claims:

Thread 1 (Thread 0x7f340e504a40 (LWP 3003))

  • #0 g_hash_table_resize
    from /lib64/libglib-2.0.so.0
  • #1 g_hash_table_remove_internal
    from /lib64/libglib-2.0.so.0
  • #2 do_call
    from /lib64/libgio-2.0.so.0
  • #3 on_name_owner_changed
    from /lib64/libgio-2.0.so.0
  • #4 emit_signal_instance_in_idle_cb
    from /lib64/libgio-2.0.so.0
  • #5 g_main_context_dispatch
    from /lib64/libglib-2.0.so.0
  • #6 g_main_context_iterate.isra.24
    from /lib64/libglib-2.0.so.0
  • #7 g_main_loop_run
    from /lib64/libglib-2.0.so.0
  • #8 meta_run
    from /lib64/libmutter.so.0
  • #9 main


gnome-shell-3.10.2.1-2.fc20.x86_64, Fedora 20
Comment 1 Kamil Páral 2013-11-27 13:37:37 UTC
Created attachment 262935 [details]
system journal
Comment 2 Kamil Páral 2013-11-27 13:37:58 UTC
Created attachment 262936 [details]
gdm :0
Comment 3 Kamil Páral 2013-11-27 13:38:11 UTC
Created attachment 262937 [details]
gdm :1
Comment 4 Kamil Páral 2013-11-27 13:38:23 UTC
Created attachment 262938 [details]
gdm :2
Comment 5 Kamil Páral 2013-11-27 13:38:37 UTC
Created attachment 262939 [details]
rpm -qa
Comment 6 Peter 2013-11-27 14:57:14 UTC
This sound like a duplicate of this of bug #709623.
Can you try if you're also affected. I currently can trigger this in 2 of 5 tries.
Comment 7 Kamil Páral 2013-11-28 10:09:56 UTC
(In reply to comment #6)
> This sound like a duplicate of this of bug #709623.
> Can you try if you're also affected. I currently can trigger this in 2 of 5
> tries.

Yes, I can reproduce it. But they might not necessarily be duplicates. The developers need to decide that. Thanks for linking it, though.
Comment 8 Bastien Nocera 2014-11-07 12:12:10 UTC
Does this still happen with gnome-shell 3.14?
Comment 9 Kamil Páral 2014-11-07 13:52:12 UTC
(In reply to comment #8)
> Does this still happen with gnome-shell 3.14?

Yes, tested with 3.14.1.5 in Fedora 21. Exactly the same approach.
Comment 10 Kamil Páral 2014-11-07 14:09:10 UTC
To clarify, the reproducer in comment 0 is just a single use case of many. If you create a few users and then randomly log in/log out/switch/lock screen/etc between them, you'll see this bug in a minute or two. It's extremely easy to hit it. My reproducer is just a series of steps that trigger it easily and reliably.
Comment 11 Kamil Páral 2015-01-06 13:22:19 UTC
I'd like to bring some attention to this issue. It's a showstopper when you want to use multiple users on a single machine (and fast-switch them, not just log out every time).

My dad complained to me about this. My girlfriend regularly hits this on my laptop. Fortunately I'm often around, but what about those poor users who don't have me around?

This is a generic issue. It's not hardware related. You don't need any luck to hit this. You don't need to follow my reproducer in the description. You just randomly switch users and you end up with a gray screen in a few minutes, every, single, time.

Can we fix this, please? I would really appreciate it. Thanks a lot.
Comment 12 Kamil Páral 2015-01-22 14:02:44 UTC
Created attachment 295173 [details]
bug demonstration video

Reproduced with gnome-shell 3.15.3 on Fedora Rawhide. The simplest reproducer I could find:

1. create two users (let's call them Red and Green), reboot
2. log in as Red, click Switch User
3. log in as Green, click Switch User
4. log in as Red, click Switch User
5. see blank gray screen

I have attached a video demonstrating the steps above, please watch it. The two users have a different wallpaper (a red and a green one) so that you can easily distinguish them.

After you end up in the gray screen, there's nothing you can do as a general user, there is no button and no keyboard shortcuts work (like ctrl+alt+del). I've tried to wait, and after waiting 7 minutes the screen was still all gray. The general user will need to hard-reset the machine.
Power users can switch to the existing user sessions using Ctrl+Alt+Fx shortcuts.

gnome-shell-3.15.3-1.fc22.x86_64
gdm-3.15.3.1-2.fc22.x86_64
systemd-218-3.fc22.x86_64

How reproducible:
100%
confirmed on several different bare metal machines and also in a cleanly installed VM
confirmed by different users (all of my family members)

Additional info:
I've tried to attach pstack output of important running processes once the gray screen bug occurred. Not sure how helpful it is. But there's no process which would be stuck and consumed 100% cpu.
Comment 13 Kamil Páral 2015-01-22 14:04:21 UTC
Created attachment 295174 [details]
rawhide - system journal
Comment 14 Kamil Páral 2015-01-22 14:04:39 UTC
Created attachment 295175 [details]
rawhide - rpm -qa
Comment 15 Kamil Páral 2015-01-22 14:05:14 UTC
Created attachment 295176 [details]
rawhide - gdm.pstack
Comment 16 Kamil Páral 2015-01-22 14:05:38 UTC
Created attachment 295177 [details]
rawhide - gdm-sessions-worker-gdm-launch-environment.pstack
Comment 17 Kamil Páral 2015-01-22 14:05:56 UTC
Created attachment 295178 [details]
rawhide - gnome-session-autostart-greeter.pstack
Comment 18 Kamil Páral 2015-01-22 14:06:15 UTC
Created attachment 295179 [details]
rawhide - gnome-shell.pstack
Comment 19 Kamil Páral 2015-01-22 14:06:35 UTC
Created attachment 295180 [details]
rawhide - Xorg-display-2.pstack
Comment 20 Kamil Páral 2015-01-22 14:12:01 UTC
A downstream Fedora report is here:
https://bugzilla.redhat.com/show_bug.cgi?id=1184933

I'm proposing this as a blocker bug for Fedora 22.
Comment 21 Ray Strode [halfline] 2015-01-22 19:50:11 UTC
I coincidentally came up with a fix for this earlier today.
Comment 22 Ray Strode [halfline] 2015-01-22 19:51:52 UTC
Created attachment 295219 [details] [review]
manager: allow the login screen to do reauthentication

At the moment, we only allow the user session to do reauthentication
from its lock screen.  If a user does user switching we instead open
a new session for checking the user's password.

This commit enables reauthentication from the login screen as well.
Comment 23 Ray Strode [halfline] 2015-01-22 19:52:33 UTC
Attachment 295219 [details] pushed as 7295b0a - manager: allow the login screen to do reauthentication
Comment 24 Kamil Páral 2015-01-23 09:17:05 UTC
It works. Thanks!
Comment 25 Kamil Páral 2015-01-23 18:57:53 UTC
Created attachment 295299 [details]
journal from rawhide VM

Soo, I'm having some problems with the new gdm. I don't know whether it is still somewhat broken, or whether it just uncovered some other issue that was not accessible before.

In Rawhide VM, I can switch between the users as many times as I want. But once I do "logout" for the second user (the green one), it seems to completely reset X server, because after a while (and some screen blinking) I arrive into gdm with *both* users logged out.

The same happens on F21 VM with the new gdm update.

However, if I try the same approach on a bare metal F21 system, I can't even switch the users properly. I can switch users once (red -> green), then I can switch green -> gdm, but once I enter the password for the red user and confirm it, the screen goes completely black. Not gray, as before, but black (backlight is still on). I can't switch VTs, I can't do anything. I can ssh in and gather logs, that's all.

Journals attached.
Comment 26 Kamil Páral 2015-01-23 18:58:17 UTC
Created attachment 295300 [details]
journal from bare metal F21
Comment 27 Kamil Páral 2015-01-23 19:27:36 UTC
As for the Rawhide VM, gdm crashes and ABRT claims it's this:
https://retrace.fedoraproject.org/faf/reports/390194/
https://bugzilla.redhat.com/show_bug.cgi?id=1117791
I have made a full backtrace here:
http://paste.fedoraproject.org/173740/22040819/
Comment 28 Ray Strode [halfline] 2015-01-23 19:29:36 UTC
Created attachment 295302 [details] [review]
manager: clean seed session when its display goes away

If the display goes away right before the session exits, then we
can crash because we'll try to finish the already finished display.

This commit corrects the problem by making sure to dissociate the
display from the seed session when the display is finished.
Comment 29 Ray Strode [halfline] 2015-01-23 19:30:07 UTC
Comment on attachment 295302 [details] [review]
manager: clean seed session when its display goes away

Attachment 295302 [details] pushed as 259ef2d - manager: clean seed session when its display goes away
Comment 30 Ken Jernigan 2015-01-24 08:15:38 UTC
Seems to be an improvement. I noticed that using the same steps previously the problem didn't occur as quickly.  I definitely had to repeat the login/logout/switch user activity more times than previous.  This time it took about  user changes before the issue happened. Again, it happens when one of the GDMs suddenly jumps from TTY3 to TTY7.  Not sure why it skips 5 and 6. A user ended up with TTY4. 

As if right now, the issue exists on my PC.  I have users on TTY1 and TTY4. Command line on TTY2, 5 & 6.  A "good" GDM with user list on TTY3.  A blank "bad" GDM on TTY7.  From both users logged in, a Switch User command goes to the "bad" GDM and not the good one.
Comment 31 Kamil Páral 2015-01-26 11:34:19 UTC
With gdm-3.15.3.1-4.fc22 (I assume that's the latest version), I still see gdm crash if I do this:
1. Log in as Red
2. Switch users 3 times: Red -> Green -> Red -> Green
3. Log out Green

Traceback here:

Thread 1 (Thread 0x7f5d3ca97840 (LWP 1078))

  • #0 gdm_display_finish
    at gdm-display.c line 666
  • #1 remove_user_session
    at gdm-manager.c line 1496
  • #2 g_closure_invoke
    at gclosure.c line 768
  • #3 signal_emit_unlocked_R
    at gsignal.c line 3536
  • #4 g_signal_emit_valist
    at gsignal.c line 3292
  • #5 g_signal_emit
    at gsignal.c line 3348
  • #6 ffi_call_unix64
    at ../src/x86/unix64.S line 76
  • #7 ffi_call
    at ../src/x86/ffi64.c line 525
  • #8 g_cclosure_marshal_generic
    at gclosure.c line 1448
  • #9 g_closure_invoke
    at gclosure.c line 768
  • #10 signal_emit_unlocked_R
    at gsignal.c line 3536
  • #11 g_signal_emitv
    at gsignal.c line 3031
  • #12 gdm_dbus_worker_proxy_g_signal
    at gdm-session-worker-glue.c line 3528
  • #13 ffi_call_unix64
    at ../src/x86/unix64.S line 76
  • #14 ffi_call
    at ../src/x86/ffi64.c line 525
  • #15 g_cclosure_marshal_generic
    at gclosure.c line 1448
  • #16 g_closure_invoke
    at gclosure.c line 768
  • #17 signal_emit_unlocked_R
    at gsignal.c line 3574
  • #18 g_signal_emit_valist
    at gsignal.c line 3292
  • #19 g_signal_emit
    at gsignal.c line 3348
  • #20 on_signal_received
    at gdbusproxy.c line 917
  • #21 emit_signal_instance_in_idle_cb
    at gdbusconnection.c line 3753
  • #22 g_main_dispatch
    at gmain.c line 3122
  • #23 g_main_context_dispatch
    at gmain.c line 3737
  • #24 g_main_context_iterate
    at gmain.c line 3808
  • #25 g_main_loop_run
    at gmain.c line 4002
  • #26 main
    at main.c line 413

Comment 32 Florian Müllner 2015-01-26 21:36:37 UTC
*** Bug 743554 has been marked as a duplicate of this bug. ***
Comment 33 Frédéric Parrenin 2015-01-27 12:20:00 UTC
I confirm this bug on fedora 21.
This is, in my opinion, a severe problem for a family usage.
I hope it can be fully fixed for gnome 3.16.
Thanks.
Comment 34 Adam Williamson 2015-03-10 04:16:07 UTC
Note: Ray, this bug is still, currently, blocking Fedora 22 Beta downstream, which means Fedora's expecting a fix in the next few weeks.
Comment 35 Matthias Clasen 2015-03-10 10:35:14 UTC
I think you misspoke, and meant to say: "fedora will help to find a fix in the next few weeks"
Comment 36 Kamil Páral 2015-03-10 13:29:03 UTC
Adam, we haven't reached any agreement whether this should be a blocker bug or not. See "criterion update: add "switch user" to Shutdown, reboot, logout" thread spread over test@, desktop@ and kde@ list (it was accepted as a blocker by QA prior to that discussion, because we supposed that discussion would non-controversial).

One further complication is that I realized we have yet another criterion covering this:
"No part of any release-blocking desktop's panel (or equivalent) configuration may crash on startup or be entirely non-functional. "
https://fedoraproject.org/wiki/Fedora_22_Beta_Release_Criteria#Desktop_panel
and if you can't switch users even a few times, people can argue that the user switch menu item is "entirely non-functional".

So, if there's a strong pushback from GNOME team on this functionality, the criterion will need to carry an explicit exception for this feature. Either way, we need to resolve this soon, before Beta.
Comment 37 Adam Williamson 2015-03-10 14:51:08 UTC
Sorry if that was a little too concise.

Kamil, the bug is on the current blockers list: it's an AcceptedBlocker. The discussion in question certainly exists, but right now it's on the list and no-one's proposed taking it off.

What I wanted to convey was that the bug's currently on the blocker list, so if folks want to avoid a bunch of heartache about it down the road, we either need to find a fix or do something else about it...
Comment 38 Ray Strode [halfline] 2015-03-10 15:06:39 UTC
All of this code was dramatically reworked in 3.15.90 ... is the problem still happening?
Comment 39 Kamil Páral 2015-03-10 16:07:05 UTC
Thanks for info, Ray, I'll re-test tomorrow.
Comment 40 Kamil Páral 2015-03-11 14:30:41 UTC
Created attachment 299101 [details]
journal when mouse gets stuck

It seems that some of those issues got fixed (yay!). I no longer see crashes or switches to an incorrect VT. However, after I switch user 4 times, the mouse stops working. I can't click on anything, nothing reacts on the cursor position (e.g. no highlight on mouse over). I don't see anything interesting in the journal, but I attached it here. When I switch back to gdm, it works again. After I log out all users, and log in again, it starts working again even in user sessions.

Reproducer:
1. log in as Red
2. switch Red -> Green -> Red -> Green -> Red
3. see that your mouse doesn't work
4. switch to gdm, see that your mouse works
5. switch to Red again, see that the mouse doesn't work again
6. log out all users and log in as Red or Green again, see that mouse works now

This is 100% reproducible for me.

PS: All the time, I have an invisible cursor in gdm - it works, it's just invisible. It's visible in all user sessions. This might be related to the bug described above, but I haven't had time to debug it yet.
Comment 41 Kamil Páral 2015-03-11 15:00:29 UTC
(In reply to Kamil Páral from comment #40)
> PS: All the time, I have an invisible cursor in gdm - it works, it's just
> invisible. It's visible in all user sessions. This might be related to the
> bug described above, but I haven't had time to debug it yet.

After further testing, this doesn't seem to be related. It's caused by having a USB Tablet assigned to that VM, and I guess wayland doesn't support tablets yet. If I remove it, the cursor in gdm becomes visible, but that does not affect the bug described in comment 40 (it still occurs). So, probably not related.
Comment 42 Ray Strode [halfline] 2015-03-11 15:03:59 UTC
do you mind filing that separately against mutter? it's probably not GDM related.
Comment 43 Kamil Páral 2015-03-12 10:12:23 UTC
Created attachment 299164 [details]
missing users in gdm

Unfortunately, while it seemed to be fixed in a VM, this is still not working on bare metal. I tried it on one of our machines, and after I perform Red -> Green -> Red -> gdm switch, I see no users in gdm to switch into. See attached screenshot.
Comment 44 Kamil Páral 2015-03-12 10:13:49 UTC
Created attachment 299165 [details]
system journal when there are missing users in gdm
Comment 45 Kamil Páral 2015-03-12 10:15:39 UTC
That's with:
gdm-3.15.91.2-1.fc22.x86_64
gnome-shell-3.15.91-1.fc22.x86_64

Ray, can you please tell me whether you can reproduce this? Simply create two passwordless users Red and Green with different wallpapers and switch back and forth between them. Thanks.
Comment 46 Ray Strode [halfline] 2015-03-12 11:36:52 UTC
likely unrelated, likely bug 746079

I haven't tried reproducing it, but let's move the discussion off this bug.
Comment 47 Ray Strode [halfline] 2015-03-12 11:37:32 UTC
(In reply to Ray Strode [halfline] from comment #46)
> I haven't tried reproducing it, but let's move the discussion off this bug.

^ there should be a "yet" after "reproducing it" in that sentence
Comment 48 Kamil Páral 2015-03-12 12:31:45 UTC
Created attachment 299197 [details]
journal with gdm debug info

This is the journal when I put Enable=true to the [debug] section of /etc/gdm/custom.conf and reproduced. The user-less login screen appeared at 13:27:00, give or take a few seconds.
Comment 49 Ray Strode [halfline] 2015-03-16 11:41:05 UTC
Created attachment 299501 [details] [review]
gdm: fix empty user list on user switching

There's some vestigial code for hiding the user list
that runs at the same time its parent is hidden.

Only the parent should be hidden, at this point, so
there's situations where the user list hides and
never comes back.

This commit fixes that, by deleting the vestigial code.
Comment 50 Kamil Páral 2015-03-17 13:49:52 UTC
I tested with http://koji.fedoraproject.org/koji/taskinfo?taskID=9242017 (which should contain the patch above) on two different bare metal machines and it works in all of them! Yay!

Thanks a lot, can you please push an update to F22 (and F21, if you think it should work as well)?
Comment 51 Florian Müllner 2015-03-17 16:19:31 UTC
Review of attachment 299501 [details] [review]:

OK
Comment 52 Ray Strode [halfline] 2015-03-17 16:23:14 UTC
Attachment 299501 [details] pushed as b1de1ad - gdm: fix empty user list on user switching