GNOME Bugzilla – Bug 610701
gnome-shell crashes frequently
Last modified: 2010-09-19 05:55:49 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
+ Trace 220671
Thread 1 (Thread 0x7ffff7fb3760 (LWP 6064))
== 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
Every time I drag'n'drop window from workspace to workspace. Sometimes switching workspace. Generally a few times per minute.
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()?
(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>
(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.
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!
Created attachment 154437 [details] [review] [build] Include all target source files Include all target source files when buildin the gir
The following fix has been pushed: f0ce4dc [build] Include all target source files
Created attachment 154440 [details] [review] [build] Include all target source files Include all target source files when buildin the gir
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
+ Trace 220678
Thread 1 (Thread 0x7ffff7fb3760 (LWP 23220))
== 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)
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.
[ 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.
(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.
After recompiling typelib all is ok. So the problem was with lack of annotations.
Please leave open until the problem described in comment 10 is fixed.
I changed things to only look in x11/ for now.