GNOME Bugzilla – Bug 407524
Freeze on unlock screen
Last modified: 2007-02-15 17:00:26 UTC
When i close my laptop lid and open it again, i input my password and dialog freezes, with label 'checking...'. Even if i click on cancel button it freezes. I have to kill my X session in order to use machine again. Run with '--no-daemon --debug 2> error.log' from a terminal i see a big log file (about 60Mb), with a lot of repeated messages: [error_watch] gs-window-x11.c:879 (13:10:28): command error output: [error_watch] gs-window-x11.c:879 (13:10:28): command error output: (gnome-screensaver-dialog:11681): Screensaver-Fast-User-Switch-WARNING **: Bad result in gdm_send_command
Oh, that's not good. The error is probably due to using an older version of GDM. However, the user switching should just fail and not lock up the system. Can you please describe the exact steps to reproduce this?
1) Close laptop lid; 2) Open it again; Unlock screen is showed 3.1) If i click on cancel button, or 3.2) If i enter my password 4) It freezes 5) Hit ctrl-alt-backspace
So, I don't think this is related to user switching at all. I tried using an older version of GDM and things work as expected: switching fails but the screensaver doesn't hang. Can you run the test-passwd tool that is included in the sources and post the output here? Thanks.
wendell@wendell-laptop:~/temp/ubuntu/ss/gnome-screensaver-2.17.7/src$ ./test-passwd ** Message: pam_start ("gnome-screensaver", "wendell", ...) ==> 0 (Success) ** Message: Handling message style 1: 'Password: ' ** Message: Waiting for lock ** Message: Waiting for respose to message style 1: 'Password: ' ** Message: Waiting for response ** Message: Got message style 1: 'Password: ' Password: ** Message: Got response ** Message: Got respose to message style 1: interrupt:0 ** Message: Msg handler returned 1 ** Message: pam_authenticate (...) ==> 0 (Success) ** Message: pam_acct_mgmt (...) ==> 9 (Authentication service cannot retrieve authentication info.) ** Message: pam_setcred (...) ==> 0 (Success) ** Message: pam_end (...) ==> 0 (Success) Correct! =============================== Look, i guess authentication is not the problem here. I click on 'cancel' button and it also freezes. BTW, i guess it does not freeze completely, because if i hit 'CAPS' key, it warn be about capslock state.
Ok, can you try the logging in via ssh and running debug-screensaver.sh as described in: http://live.gnome.org/GnomeScreensaver/FrequentlyAskedQuestions#head-d50bc17e7d6f3a51c4715f02c657195e80e26c2c At the point where it hangs just do a CTRL-C and then type "thread apply all bt". Thanks.
How can i log in via virtual terminal (ALT-F1) and run a X program? I tried 'export DISPLAY=:0.0', but is stopped with the message: Could not determine DBUS_SESSION_BUS_ADDRESS Do you use irc? my nick is jwendell.
Did you try running the debug-screensaver.sh script that was linked to the FAQ and included in the source? I'm not on irc but I'm on jabber william.jon.mccann@gmail.com.
So far, we've been able to figure out that the bt is:
+ Trace 110486
Created attachment 82489 [details] abbreviated debug log
(15:58:09) Me: so it looks like the gnome-screensaver-dialog process doesn't die (15:58:21) Me: and the gnome-screensaver process is waiting for it to die (15:58:59) Me: which is very unusual since the RESPONSE=CANCEL line is immediately before gtk_main_quit() (15:59:14) Me: but one of the threads must be refusing to quit or something (16:00:13) Me: so two things we can do... a) call exit() instead of gtk_main_quit() b) explicitly kill() the dialog process when we wait for it for a while (16:00:46) Me: there is still an underlying problem however (16:00:59) jonh.wendell@gmail.com: and all those messages about gdm command invalid? (16:01:09) Me: the thing that is causing all those warning messages and is likely hanging the dialog (16:01:10) Me: yes
Jonh: when you get a chance can you try to get a backtrace of where the dialog is hanging? Just like before try to reproduce the problem and when it hangs after clicking cancel go to a command line and do something like: gdb --pid `ggrep gnome-screensaver-dialog` (gdb) c Then do a CTRL-C (gdb) set logging on (gdb) thread apply all bt (gdb) set logging off (gdb) quit And attach the output of that. Thanks!
Created attachment 82546 [details] [review] Patch from Ubuntu Ubuntu's changelog: gnome-screensaver (2.17.7-0ubuntu2) feisty; urgency=low . * make sure we look in /var/run for the .gdm_socket file
Created attachment 82613 [details] bt of gnome-screensaver-dialog OK, I can reproduce this if I change GDM_SOCKET_FILENAME.
Thomas, I've patch gdm-queue.c to fix this: http://svn.gnome.org/viewcvs/gnome-screensaver/trunk/src/cut-n-paste/gdm-queue.c?rev=1078&r1=1095&r2=1078 I've also committed a change to always signal the subprocess even if we expect it has already died - just to be safe.