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 407524 - Freeze on unlock screen
Freeze on unlock screen
Status: RESOLVED FIXED
Product: gnome-screensaver
Classification: Deprecated
Component: daemon
2.17.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-screensaver maintainers
gnome-screensaver maintainers
Depends on:
Blocks:
 
 
Reported: 2007-02-13 16:18 UTC by Jonh Wendell
Modified: 2007-02-15 17:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
abbreviated debug log (8.17 KB, text/plain)
2007-02-13 20:56 UTC, William Jon McCann
  Details
Patch from Ubuntu (711 bytes, patch)
2007-02-14 17:17 UTC, Jonh Wendell
none Details | Review
bt of gnome-screensaver-dialog (3.99 KB, text/plain)
2007-02-15 16:20 UTC, William Jon McCann
  Details

Description Jonh Wendell 2007-02-13 16:18:37 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
Comment 1 William Jon McCann 2007-02-13 16:42:24 UTC
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?
Comment 2 Jonh Wendell 2007-02-13 16:58:20 UTC
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
Comment 3 William Jon McCann 2007-02-13 17:26:17 UTC
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.
Comment 4 Jonh Wendell 2007-02-13 17:56:05 UTC
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.
Comment 5 William Jon McCann 2007-02-13 18:01:44 UTC
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.
Comment 6 Jonh Wendell 2007-02-13 18:27:21 UTC
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.
Comment 7 William Jon McCann 2007-02-13 18:34:25 UTC
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.
Comment 8 William Jon McCann 2007-02-13 20:55:43 UTC
So far, we've been able to figure out that the bt is:
  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/tls/i686/cmov/libpthread.so.0
  • #2 wait_on_child
    at gs-window-x11.c line 1123
  • #3 gs_window_dialog_finish
    at gs-window-x11.c line 1280
  • #4 lock_command_watch
    at gs-window-x11.c line 1394
  • #5 ??
    from /usr/lib/libglib-2.0.so.0
  • #6 ??
  • #7 ??
  • #8 ??
  • #9 ??
    from /usr/lib/libglib-2.0.so.0
  • #10 ??
    from /lib/tls/i686/cmov/libpthread.so.0
  • #11 ??
  • #12 ??
  • #13 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0

Comment 9 William Jon McCann 2007-02-13 20:56:31 UTC
Created attachment 82489 [details]
abbreviated debug log
Comment 10 William Jon McCann 2007-02-13 21:04:07 UTC
(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
Comment 11 William Jon McCann 2007-02-13 21:30:05 UTC
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!
Comment 12 Jonh Wendell 2007-02-14 17:17:21 UTC
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
Comment 13 William Jon McCann 2007-02-15 16:20:49 UTC
Created attachment 82613 [details]
bt of gnome-screensaver-dialog

OK, I can reproduce this if I change GDM_SOCKET_FILENAME.
Comment 14 William Jon McCann 2007-02-15 17:00:26 UTC
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.