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 610701 - gnome-shell crashes frequently
gnome-shell crashes frequently
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
unspecified
Other Linux
: Normal blocker
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-02-22 16:11 UTC by Maciej (Matthew) Piechotka
Modified: 2010-09-19 05:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[build] Include all target source files (880 bytes, patch)
2010-02-22 20:27 UTC, Johan (not receiving bugmail) Dahlin
none Details | Review
[build] Include all target source files (880 bytes, patch)
2010-02-22 20:30 UTC, Johan (not receiving bugmail) Dahlin
committed Details | Review

Description Maciej (Matthew) Piechotka 2010-02-22 16:11:28 UTC
GNU gdb (Gentoo 7.0.1 p1) 7.0.1
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/mutter...Reading symbols from /usr/lib64/debug/usr/bin/mutter.debug...done.
(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/mutter --mutter-plugins=libgnome-shell --replace
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.2303.0-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffe9ba2710 (LWP 6075)]
[New Thread 0x7fffe7472710 (LWP 6077)]
      JS LOG: GNOME Shell started at Mon Feb 22 2010 15:53:34 GMT+0000 (BST)
WARNING: Application calling GLX 1.3 function "glXCreatePixmap" when GLX 1.3 is not supported!  This is an application bug!
[New Thread 0x7fffe6a53710 (LWP 6078)]
[New Thread 0x7fffe617e710 (LWP 6079)]
[Thread 0x7fffe7472710 (LWP 6077) exited]
[Thread 0x7fffe617e710 (LWP 6079) exited]
[New Thread 0x7fffe617e710 (LWP 6088)]
[New Thread 0x7fffe7472710 (LWP 6089)]
[New Thread 0x7fffdb1b7710 (LWP 6090)]
[Thread 0x7fffe617e710 (LWP 6088) exited]
[Thread 0x7fffe6a53710 (LWP 6078) exited]
[Thread 0x7fffdb1b7710 (LWP 6090) exited]
[Thread 0x7fffe7472710 (LWP 6089) exited]

Program received signal SIGTRAP, Trace/breakpoint trap.
IA__g_logv (log_domain=<value optimized out>, log_level=<value optimized out>, 
    format=<value optimized out>, args1=0x7fffffffc050) at gmessages.c:555
555	gmessages.c: No such file or directory.
	in gmessages.c
(gdb) thread apply all bt full

Thread 1 (Thread 0x7ffff7fb3760 (LWP 6064))

  • #0 IA__g_logv
    at gmessages.c line 555
  • #1 IA__g_log
    at gmessages.c line 569
  • #2 _gdk_window_destroy_hierarchy
    at gdkwindow.c line 1991
  • #3 gdk_window_finalize
    at gdkwindow.c line 596
  • #4 IA__g_object_unref
    at gobject.c line 2484
  • #5 gjs_g_arg_release_internal
    at gi/arg.c line 1702
  • #6 gjs_invoke_c_function
    at gi/function.c line 694
  • #7 js_Invoke
    at jsinterp.cpp line 1360
  • #8 js_Interpret
    at jsops.cpp line 2240
  • #9 js_Invoke
    at jsinterp.cpp line 1368
  • #10 js_fun_apply
    at jsfun.cpp line 2046
  • #11 js_Interpret
    at jsops.cpp line 2208
  • #12 js_Invoke
    at jsinterp.cpp line 1368
  • #13 js_InternalInvoke
    at jsinterp.cpp line 1423
  • #14 JS_CallFunctionValue
    at jsapi.cpp line 5112
  • #15 gjs_call_function_value
    at gjs/jsapi-util.c line 916
  • #16 gjs_closure_invoke
    at gi/closure.c line 264
  • #17 closure_source_func
    at modules/mainloop.c line 130
  • #18 g_timeout_dispatch
    at gmain.c line 3396
  • #19 g_main_dispatch
    at gmain.c line 1960
  • #20 IA__g_main_context_dispatch
    at gmain.c line 2513
  • #21 g_main_context_iterate
    at gmain.c line 2591
  • #22 IA__g_main_loop_run
    at gmain.c line 2799
  • #23 main
    at core/main.c line 725

Thread 1 (Thread 0x7ffff7fb3760 (LWP 6064))

  • #0 IA__g_logv
    at gmessages.c line 555
  • #1 IA__g_log
    at gmessages.c line 569
  • #2 _gdk_window_destroy_hierarchy
    at gdkwindow.c line 1991
  • #3 gdk_window_finalize
    at gdkwindow.c line 596
  • #4 IA__g_object_unref
    at gobject.c line 2484
  • #5 gjs_g_arg_release_internal
    at gi/arg.c line 1702
  • #6 gjs_invoke_c_function
    at gi/function.c line 694
  • #7 js_Invoke
    at jsinterp.cpp line 1360
  • #8 js_Interpret
    at jsops.cpp line 2240
  • #9 js_Invoke
    at jsinterp.cpp line 1368
  • #10 js_fun_apply
    at jsfun.cpp line 2046
  • #11 js_Interpret
    at jsops.cpp line 2208
  • #12 js_Invoke
    at jsinterp.cpp line 1368
  • #13 js_InternalInvoke
    at jsinterp.cpp line 1423
  • #14 JS_CallFunctionValue
    at jsapi.cpp line 5112
  • #15 gjs_call_function_value
    at gjs/jsapi-util.c line 916
  • #16 gjs_closure_invoke
    at gi/closure.c line 264
  • #17 closure_source_func
    at modules/mainloop.c line 130
  • #18 g_timeout_dispatch
    at gmain.c line 3396
  • #19 g_main_dispatch
    at gmain.c line 1960
  • #20 IA__g_main_context_dispatch
    at gmain.c line 2513
  • #21 g_main_context_iterate
    at gmain.c line 2591
  • #22 IA__g_main_loop_run
    at gmain.c line 2799
  • #23 main
    at core/main.c line 725
== Stack trace for context 0x1164f70 ==
0 [native frame]
1 anonymous() ["/usr/share/gnome-shell/js/ui/workspace.js":517]
2 anonymous() ["/usr/share/gjs-1.0/lang.js":110]


== Stack trace for context 0xb460a0 ==
(JavaScript stack is empty)


== Stack trace for context 0xb460f0 ==
(JavaScript stack is empty)


(gdb)

It crashes especially when creating new workspace
Comment 1 Maciej (Matthew) Piechotka 2010-02-22 16:16:35 UTC
Every time I drag'n'drop window from workspace to workspace. Sometimes switching workspace. Generally a few times per minute.
Comment 2 Owen Taylor 2010-02-22 16:28:54 UTC
Looks like reference counting might have been messed up for the root window - the JS code seems to be:

  let [child, x, y, mask] = Gdk.Screen.get_default().get_root_window().get_pointer();

And the GTK+ error might be a g_error() when then root window gets destroyed. 

gdk_screen_get_root_window() appears correctly annotated, however, both in gir-repository and in the GTK+ sources.

- How did you build gnome-shell?

- What exact version of GTK+? - I need to know what is line 1991 of gdkwindow.c - and given the exact version number I should be able to figure that out.

  (Or alternatively what's actually printed out when it dies? a fatal error should appear on the output)

 - If you can find Gdk-2.0.gir (either in your jhbuild directory if jhbuilding or in the system directories), can you show the section around gdk_screen_get_root_window()?
Comment 3 Maciej (Matthew) Piechotka 2010-02-22 19:07:18 UTC
(In reply to comment #2)
> Looks like reference counting might have been messed up for the root window -
> the JS code seems to be:
> 
>   let [child, x, y, mask] =
> Gdk.Screen.get_default().get_root_window().get_pointer();
> 
> And the GTK+ error might be a g_error() when then root window gets destroyed. 
> 
> gdk_screen_get_root_window() appears correctly annotated, however, both in
> gir-repository and in the GTK+ sources.
> 
> - How did you build gnome-shell?
> 

By ebuild from suka overlay. 

> - What exact version of GTK+? - I need to know what is line 1991 of gdkwindow.c
> - and given the exact version number I should be able to figure that out.
> 

x11-libs/gtk+-2.19.5

>   (Or alternatively what's actually printed out when it dies? a fatal error
> should appear on the output)
> 

I guess evolution warnings does not count? I haven't found anything.

>  - If you can find Gdk-2.0.gir (either in your jhbuild directory if jhbuilding
> or in the system directories), can you show the section around
> gdk_screen_get_root_window()?

Method element (I suppose you mean that):
      <method name="get_root_window" c:identifier="gdk_screen_get_root_window">
        <return-value transfer-ownership="full">
          <type name="Window" c:type="GdkWindow*"/>
        </return-value>
      </method>
Comment 4 Owen Taylor 2010-02-22 19:29:09 UTC
(In reply to comment #3)
>
> >  - If you can find Gdk-2.0.gir (either in your jhbuild directory if jhbuilding
> > or in the system directories), can you show the section around
> > gdk_screen_get_root_window()?
> 
> Method element (I suppose you mean that):
>       <method name="get_root_window" c:identifier="gdk_screen_get_root_window">
>         <return-value transfer-ownership="full">
>           <type name="Window" c:type="GdkWindow*"/>
>         </return-value>
>       </method>

OK, that's the problem - transfer-ownership="full" is supposed to be transfer-ownership="none". Verified that the same problem occurs in Fedora Rawhide. Source code looks right, so reassigning to gobject-introspection for g-ir-scanner fixage.
Comment 5 Owen Taylor 2010-02-22 19:33:36 UTC
Oh, GDK doesn't include the code in x11/ at all when generating the GIR file. That can't work, many doc comments are in x11/. (They are cross-platform doc coments, so they need to be scanned even when building a different backend.) Makefile fun time!
Comment 6 Johan (not receiving bugmail) Dahlin 2010-02-22 20:27:38 UTC
Created attachment 154437 [details] [review]
[build] Include all target source files

Include all target source files when buildin the gir
Comment 7 Johan (not receiving bugmail) Dahlin 2010-02-22 20:30:21 UTC
The following fix has been pushed:
f0ce4dc [build] Include all target source files
Comment 8 Johan (not receiving bugmail) Dahlin 2010-02-22 20:30:30 UTC
Created attachment 154440 [details] [review]
[build] Include all target source files

Include all target source files when buildin the gir
Comment 9 Maciej (Matthew) Piechotka 2010-02-22 22:52:35 UTC
I'm not sure if gjs uses raw gir files or the one compilled (sorry - I don't remember name of format) by problem persisted after hand-editing Gdk-2.0.gir. In any case I attach backtrace.

GNU gdb (Gentoo 7.0.1 p1) 7.0.1
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/mutter...Reading symbols from /usr/lib64/debug/usr/bin/mutter.debug...done.
(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/mutter --mutter-plugins=libgnome-shell --replace
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.2303.0-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffe9fdb710 (LWP 23390)]
[New Thread 0x7fffe78bc710 (LWP 23437)]
[New Thread 0x7fffe70bb710 (LWP 23438)]
      JS LOG: GNOME Shell started at Mon Feb 22 2010 22:15:50 GMT+0000 (BST)
WARNING: Application calling GLX 1.3 function "glXCreatePixmap" when GLX 1.3 is not supported!  This is an application bug!
[New Thread 0x7fffe65c8710 (LWP 23439)]
WARNING: Application calling GLX 1.3 function "glXDestroyPixmap" when GLX 1.3 is not supported!  This is an application bug!
Window manager warning: Log level 8: meta_window_set_user_time: assertion `!window->override_redirect' failed
Window manager warning: Log level 16: losing last reference to undestroyed window

Window manager warning: Log level 6: attempted to destroy root window
[Thread 0x7fffe78bc710 (LWP 23437) exited]
[Thread 0x7fffe70bb710 (LWP 23438) exited]
[Thread 0x7fffe65c8710 (LWP 23439) exited]
[New Thread 0x7fffe65c8710 (LWP 26662)]
[New Thread 0x7fffe70bb710 (LWP 26663)]
[New Thread 0x7fffe78bc710 (LWP 26665)]
[New Thread 0x7fffe4b5b710 (LWP 26668)]
[New Thread 0x7fffd63ac710 (LWP 26670)]
[New Thread 0x7fffd5bab710 (LWP 26671)]
[New Thread 0x7fffd53aa710 (LWP 26672)]
[New Thread 0x7fffd4ba9710 (LWP 26673)]
[New Thread 0x7fffd43a8710 (LWP 26676)]
[New Thread 0x7fffd3ba7710 (LWP 26680)]
[Thread 0x7fffe65c8710 (LWP 26662) exited]
[Thread 0x7fffd53aa710 (LWP 26672) exited]
[Thread 0x7fffd43a8710 (LWP 26676) exited]
[Thread 0x7fffd4ba9710 (LWP 26673) exited]
[Thread 0x7fffe70bb710 (LWP 26663) exited]
[Thread 0x7fffe4b5b710 (LWP 26668) exited]
[Thread 0x7fffe78bc710 (LWP 26665) exited]
[Thread 0x7fffd5bab710 (LWP 26671) exited]
[Thread 0x7fffd63ac710 (LWP 26670) exited]
[Thread 0x7fffd3ba7710 (LWP 26680) exited]
[New Thread 0x7fffd3ba7710 (LWP 28621)]
[Thread 0x7fffd3ba7710 (LWP 28621) exited]
[New Thread 0x7fffd3ba7710 (LWP 30178)]
[Thread 0x7fffd3ba7710 (LWP 30178) exited]
[New Thread 0x7fffd3ba7710 (LWP 11690)]
[Thread 0x7fffd3ba7710 (LWP 11690) exited]
[New Thread 0x7fffd3ba7710 (LWP 29009)]
[Thread 0x7fffd3ba7710 (LWP 29009) exited]
[New Thread 0x7fffd3ba7710 (LWP 9035)]
[Thread 0x7fffd3ba7710 (LWP 9035) exited]
[New Thread 0x7fffd3ba7710 (LWP 26567)]
[Thread 0x7fffd3ba7710 (LWP 26567) exited]

Program received signal SIGTRAP, Trace/breakpoint trap.
IA__g_logv (log_domain=<value optimized out>, log_level=<value optimized out>, format=<value optimized out>, args1=0x7fffffffc450) at gmessages.c:555
555	gmessages.c: No such file or directory.
	in gmessages.c
(gdb) apply all bt full

Thread 1 (Thread 0x7ffff7fb3760 (LWP 23220))

  • #0 IA__g_logv
    at gmessages.c line 555
  • #1 IA__g_log
    at gmessages.c line 569
  • #2 _gdk_window_destroy_hierarchy
    at gdkwindow.c line 1991
  • #3 gdk_window_finalize
    at gdkwindow.c line 596
  • #4 IA__g_object_unref
    at gobject.c line 2484
  • #5 gjs_g_arg_release_internal
    at gi/arg.c line 1702
  • #6 gjs_invoke_c_function
    at gi/function.c line 694
  • #7 js_Invoke
    at jsinterp.cpp line 1360
  • #8 js_Interpret
    at jsops.cpp line 2240
  • #9 js_Invoke
    at jsinterp.cpp line 1368
  • #10 js_fun_apply
    at jsfun.cpp line 2046
  • #11 js_Interpret
    at jsops.cpp line 2208
  • #12 js_Invoke
    at jsinterp.cpp line 1368
  • #13 js_InternalInvoke
    at jsinterp.cpp line 1423
  • #14 JS_CallFunctionValue
    at jsapi.cpp line 5112
  • #15 gjs_call_function_value
    at gjs/jsapi-util.c line 916
  • #16 gjs_closure_invoke
    at gi/closure.c line 264
  • #17 closure_source_func
    at modules/mainloop.c line 130
  • #18 g_timeout_dispatch
    at gmain.c line 3396
  • #19 g_main_dispatch
    at gmain.c line 1960
  • #20 IA__g_main_context_dispatch
    at gmain.c line 2513
  • #21 g_main_context_iterate
    at gmain.c line 2591
  • #22 IA__g_main_loop_run
    at gmain.c line 2799
  • #23 main
    at core/main.c line 725
== Stack trace for context 0x11432d0 ==
0 [native frame]
1 anonymous() ["/usr/share/gnome-shell/js/ui/workspace.js":517]
2 anonymous() ["/usr/share/gjs-1.0/lang.js":110]


== Stack trace for context 0xb45540 ==
(JavaScript stack is empty)


== Stack trace for context 0xb45590 ==
(JavaScript stack is empty)


(gdb) quit
A debugging session is active.

	Inferior 1 [process 23220] will be killed.

Quit anyway? (y or n)
Comment 10 Owen Taylor 2010-02-23 12:26:06 UTC
Review of attachment 154440 [details] [review]:

::: gdk/Makefile.am
@@ +200,3 @@
         gdkenumtypes.c \
+        gdkenumtypes.h \
+        $(wildcard $(srcdir)/$(gdktarget)/*.c)

Conceptually this isn't right - the doc comments for many functions (that are implemented per-backend instead of virtualized) are found in the x11/ directory and not duplicated across backends. So, assuming we don't care about backend specific functions, this should look like:

      $(srcdir)/x11/*.c

If we did care about backend-specific public functions, it would have to be more like:

      $(srcdir)/x11/*.c \
 if BUILD_X11
      $(srcdir)/x11/gdkx.h \
 elif BUILD_WIN32
      $(srcdir)/win32/*.c \
      $(srcdir)/win32/gdkwin32.h \
 elif BUILD_QUARTZ
      $(srcdir)/quartz/*.c \
      $(srcdir)/quartz/gdkquartz.h \
 endif

Untested, gdkx11/gdkwin32/gdkquartz.h probably all have types that will make the scanner choke. For now, the first is probably the right approach.
Comment 11 Owen Taylor 2010-02-23 12:29:45 UTC
[ Reopening for the question of style ]

Maciej - the .gir file is compiled  into a typelib file - most likely you edited the .gir file but didn't compile it again into a typelib. Even if you did that, this is not the only instance of the problem you are going to hit - there are a number of annotations that will be affected by this.
Comment 12 Maciej (Matthew) Piechotka 2010-02-23 13:06:23 UTC
(In reply to comment #11)
> [ Reopening for the question of style ]
> 
> Maciej - the .gir file is compiled  into a typelib file - most likely you
> edited the .gir file but didn't compile it again into a typelib.

Note to self: if it's is late first think the report bug. I know that typelib is generated from gir and I know that I should recompile it instead of posting backtrace. Now I am checking and it seems that after recompiling od that gir file all is ok.

> Even if you
> did that, this is not the only instance of the problem you are going to hit -
> there are a number of annotations that will be affected by this.

Yes. But currently I'm mostly interested in problem which crashes my system. And if fix would not help and crash was at this place it could mean that it is is not the fix.
Comment 13 Maciej (Matthew) Piechotka 2010-02-24 15:38:02 UTC
After recompiling typelib all is ok. So the problem was with lack of annotations.
Comment 14 Owen Taylor 2010-02-24 23:45:54 UTC
Please leave open until the problem described in comment 10 is fixed.
Comment 15 Matthias Clasen 2010-02-25 00:06:43 UTC
I changed things to only look in x11/ for now.