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 129402 - gnome-session hangs on logout with X11 Window system error
gnome-session hangs on logout with X11 Window system error
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
2.5.x
Other Linux
: Urgent critical
: ---
Assigned To: Session Maintainers
Session Maintainers
: 121384 128864 128985 129194 129610 130053 131539 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-12-15 21:24 UTC by Jan de Groot
Modified: 2005-08-15 01:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
hacked on it til it worked (5.81 KB, patch)
2004-01-03 20:38 UTC, Carlos Romero
none Details | Review

Description Jan de Groot 2003-12-15 21:24:31 UTC
With Glib 2.3.1, gnome-session 2.5.x crashes with an X11 error when logging
out. A few lines before the crash, it also warns about a g_object thing
that can only be executed at constructor time, a thing that has changed in
glib 2.3.1 according to gobject/Changelog from glib:

Sat Nov 29 14:57:20 2003  Tim Janik  <timj@gtk.org>
                                                                          
     
        * gobject.c: fix g_object_set() within _init() implementations
        not working for construct-only properties.
        (g_object_init): make the object enter a construct_objects list.
        (g_object_newv): remove object from construct_objects after creation.
        (g_object_set_valist):
        (g_object_set_property): allow construct-only properties for
        objects which are in construct_objects.

on line 407 of gnome-session/logout.c, there's a g_object_set which fails
as far as I can see:

  g_object_set (G_OBJECT (box), "type", GTK_WINDOW_POPUP, NULL);

A few lines later, line 482, it calls XSetInputFocus on the same object,
which causes the X11 error and hangs gnome-session. It seems the window
that is put focus on isn't in Input mode. I think the g_object_set needs a
look at it and needs to be reprogrammed, or the change in glib should be
reverted back.
Comment 1 Jan de Groot 2003-12-29 11:37:06 UTC
Since epiphany 1.1.2 needs glib 2.3.1, I had to put glib 2.3.1 in my
repo today, so I looked after this bug.
As I don't want to crash X when loggin out, I got rid of the
g_object_set_valist warning: I simply wrecked the check out of
glib/gobject/glib.c. After recompiling glib, the warning message and
the X crash is gone.

Though above solution isn't the neatest, but only the quickest, I
think we need to remake the logout dialog.

What happens now:
- we make a dialog
- we put stuff on it
- we force it to be a popup (which isn't allowed in glib 2.3.1 anymore)
- we put focus on it

This is very dirty IMHO and needs some work. 
Comment 2 Luis Villa 2003-12-31 16:50:50 UTC
*** Bug 128985 has been marked as a duplicate of this bug. ***
Comment 3 Luis Villa 2003-12-31 16:52:14 UTC
*** Bug 129610 has been marked as a duplicate of this bug. ***
Comment 4 Luis Villa 2003-12-31 16:53:23 UTC
From one of the dups:

using gnome-session from CVS HEAD 08 Dec 2003

-log into a session(disable accessibility gconf key prior)
-go to actions -> log out

.the desktop freezes and cant be saved without killing the session

The following is stack output from gnome-session when frozen:

  • #0 wait4
    from /lib/i686/libc.so.6
  • #1 __DTOR_END__
    from /lib/i686/libc.so.6
  • #2 waitpid
    from /lib/i686/libpthread.so.0
  • #3 libgnomeui_segv_handle
    at gnome-ui-init.c line 738
  • #4 pthread_sighandler
    from /lib/i686/libpthread.so.0
  • #5 <signal handler called>
  • #6 g_logv
  • #7 g_log
    at gmessages.c line 541
  • #8 gdk_x_error
    at gdkmain-x11.c line 530
  • #9 bonobo_x_error_handler
    at bonobo-ui-main.c line 50
  • #10 _XError
    from /usr/X11R6/lib/libX11.so.6
  • #11 _XReply
    from /usr/X11R6/lib/libX11.so.6
  • #12 XInternAtom
    from /usr/X11R6/lib/libX11.so.6
  • #13 gdk_x11_atom_to_xatom_for_display
    at gdkproperty-x11.c line 195
  • #14 gdk_wmspec_change_state
    at gdkwindow-x11.c line 1839
  • #15 gdk_window_set_modal_hint
    at gdkwindow-x11.c line 1879
  • #16 gtk_window_set_modal
    at gtkwindow.c line 1638
  • #17 gtk_dialog_run
    at gtkdialog.c line 949
  • #18 display_gui
    at logout.c line 487
  • #19 maybe_display_gui
    at logout.c line 580
  • #20 process_save_request
    at manager.c line 1018
  • #21 save_yourself_request
    at manager.c line 1107
  • #22 _SmsProcessMessage
    from /usr/X11R6/lib/libSM.so.6
  • #23 IceProcessMessages
    from /usr/X11R6/lib/libICE.so.6
  • #24 process_ice_messages
    at gnome-ice.c line 57
  • #25 g_io_unix_dispatch
    at giounix.c line 159
  • #26 g_main_dispatch
    at gmain.c line 1752
  • #27 g_main_context_dispatch
    at gmain.c line 2300
  • #28 g_main_context_iterate
    at gmain.c line 2381
  • #29 g_main_loop_run
    at gmain.c line 2601
  • #30 gtk_main
    at gtkmain.c line 1158
  • #31 main
    at main.c line 658
  • #32 __libc_start_main
    from /lib/i686/libc.so.6

Interestingly this does _not_ occur with accessibility gconf key set
to true..


Comment 5 Carlos Romero 2004-01-03 20:38:13 UTC
Created attachment 22874 [details] [review]
hacked on it til it worked
Comment 6 Carlos Romero 2004-01-03 20:39:14 UTC
*** Bug 130053 has been marked as a duplicate of this bug. ***
Comment 7 alexander.winston 2004-01-03 20:42:54 UTC
Adding the PATCH keyword to make sure that this patch gets in.
Comment 8 Heath Harrelson 2004-01-04 08:16:22 UTC
*** Bug 129194 has been marked as a duplicate of this bug. ***
Comment 9 Matthew Gatto 2004-01-09 00:50:29 UTC
The above patch applies cleanly to my garnome GNOME-2.5.2 install and
stops the logout hang. Although, it takes ~40 seconds for the logout
confirmation dialog to come up.
Comment 10 Matthew Gatto 2004-01-09 02:37:14 UTC
The logout delay I mentioned in my above comment has nothing to do
with this bug though, that is probably bug 95834
Comment 11 Mark McLoughlin 2004-01-14 10:16:43 UTC
*** Bug 121384 has been marked as a duplicate of this bug. ***
Comment 12 Mark McLoughlin 2004-01-14 10:35:23 UTC
Carlos: I couldn't use your patch because you hadn't narrowed the
problem down to the root cause and you had several changes which had
nothing to do with the problem.

I turns out the problem is caused by gtk+ 2.3 making GtkWindow's
"type" property CONSTRUCT_ONLY, making the logout window not
override_redirect anymore. Because the Xserver is grabbed the WM never
maps the window.

I've just committed a patch to fix this on HEAD:

2004-01-14  Mark McLoughlin  <mark@skynet.ie>
                                                                     
                                                                         
        Fix logout freezing reported in bug #129402. Also, make
        the logout window WM managed if a11y is enabled, see
        bug #122737.
                                                                     
                                                                         
        * logout.c:
        (force_pango_cache_init): kill, we're not using the
        pangox backend anymore.
        (display_gui): Don't grab the keyboard or mouse if
        a11y is enabled. Also, only create a override_redirect
        window if a11y is disabled. Don't try and set the
        GtkWindow's "type" property after construction as gtk+
        2.3 doesn't allow this anymore. Delay grabbing the
        Xserver as long as possible. Don't leak the invisible
        window.
                                                                     
                                                                     
                                                                     
                                                                     
      
Comment 13 Mark McLoughlin 2004-01-14 12:12:33 UTC
Btw, Jan I realize now that your analysis that the glib change caused
the problem was correct. Good call ..
Comment 14 Mark McLoughlin 2004-01-15 13:22:16 UTC
*** Bug 131539 has been marked as a duplicate of this bug. ***
Comment 15 Matthew Gatto 2004-02-13 21:29:16 UTC
*** Bug 128864 has been marked as a duplicate of this bug. ***