GNOME Bugzilla – Bug 661323
GNOME Shell crashes when using the Weather extension
Last modified: 2012-08-28 01:55:36 UTC
When I have lots of windows open in different wordspaces and I change several time (and quick changes) of workspace, gnome-shell bug and restart. The first time, restart works and my windows appears again but after the second time, I have a error message which say the session must be close and show me my gnome-shell extensions. I have only one extension for the weather and it works fine. Sorry I don't know where I can find relevant log file.
Please attach your ~/.xsession-errors file from after the first crash.
Created attachment 198662 [details] xsession-errors Here is my xsession-errors taked just after a first crash (so gnome-shell had restart properly).
There is quodlibet (a music player) working during these crashs and I see some information about music on the xsession-errors, maybe there is a link ...
(In reply to comment #3) > There is quodlibet (a music player) working during these crashs and I see some > information about music on the xsession-errors, maybe there is a link ... No. > ERROR:gi/object.c:671:gjs_object_instance_constructor: assertion failed: (unthreadsafe_template_for_constructor.info == NULL || strcmp(g_base_info_get_name( (GIBaseInfo*) priv->info), g_base_info_get_name( (GIBaseInfo*) unthreadsafe_template_for_constructor.info)) == 0) is the crash.
Can you get a backtrace?
(See http://live.gnome.org/GettingTraces for that)
Sorry but for now, I can't repeat this bug. If it happens again I will post a backtrace.
OK.
Created attachment 200118 [details] backtrace
I attached a backtrace I made just now. In case I missed some dbgsym packages I can try again. :)
This is a crash in gjs/gobject-introspection. CCing walters.
*** Bug 662805 has been marked as a duplicate of this bug. ***
Anybody who is getting this crash, please install debug symbols for: gnome-shell gobject-introspection gjs and attach a new backtrace. If you use Arch Linux, there are patches provided by ioni in http://pkgbuild.com/~ioni/debug/
Created attachment 200353 [details] backtrace with specified dbgsym packages installed
Are you sure you have installed gjs debug symbols? The trace is still almost empty. And it could help to install libmozjs/xulrunner symbols too.
$ dpkg -l | grep gjs ii gjs 1.30.0-0ubuntu1 Mozilla-based javascript bindings for the GNOME platform ii gjs-dbgsym 1.30.0-0ubuntu1 debug symbols for package gjs ii libgjs0c 1.30.0-0ubuntu1 Mozilla-based javascript bindings for the GNOME platform will install the other dbgsyms too...will take me some time. However: gjs was not installed on the system at all before installing gjs-dbgsym. I'm using ubuntu oneiric.
nvm, it was libgjs0c-dbgsym. sorry for the spam :X
Created attachment 200361 [details] backtrace with libgjs0c-dbgsym
When it happens, can you try: (gdb) f 4 (gdb) p g_base_info_get_name(priv->info) (gdb) p g_base_info_get_name(unthreadsafe_template_for_constructor.info) I think I have a basic idea of what's happening here...
> (gdb) f 4
+ Trace 228957
> (gdb) p g_base_info_get_name(priv->info) $1 = -584980272 > (gdb) p g_base_info_get_name(unthreadsafe_template_for_constructor.info) $2 = -592703020
I also suffer from this bug. If you need any information.
Same errors here.
same error here... using Gnome-shell from Oneiric
OK, I'm confused. I was expecting a string value for the output of g_base_info_get_name. Did I gdb wrong? Try: (gdb) f 4 (gdb) p (char*) g_base_info_get_name(priv->info) (gdb) p (char*) g_base_info_get_name(unthreadsafe_template_for_constructor.info)
+ Trace 228977
$1 = 0xffffffffe1a2c8d0 <Address 0xffffffffe1a2c8d0 out of bounds> $2 = 0xffffffffe1a1a1d4 <Address 0xffffffffe1a1a1d4 out of bounds>
OK, something's stomping on memory here. Is everyone that is seeing this bug on Ubuntu?
I think I have the same bug (or similar) and I'm also on Ubuntu.
Does anyone have a way to get this crash reliably? If so, please give clear directions to see if it's repeatable on my machine here, as well as posting both a backtrace and gjs_dumpstack.
It often happens to me when I'm alt+tab changing windows, can't really say any more, because I cant determine a pattern here.
To me it hadn't happened in a few days, but usually it happens when there are many programs open and I use the Top-Left activities button or maybe Alt-Tab as well. I will try to reproduce it more reliably and see if I can find some pattern.
Created attachment 200656 [details] backtrace+gjs_dumpstack
Comment on attachment 200656 [details] backtrace+gjs_dumpstack ok,somehow the gjs_dumpstack is missing, I'll try and get a new one. Basically it was s.th. in AltTab.js.
ERROR:gi/object.c:671:gjs_object_instance_constructor: assertion failed: (unthreadsafe_template_for_constructor.info == NULL || strcmp(g_base_info_get_name( (GIBaseInfo*) priv->info), g_base_info_get_name( (GIBaseInfo*) unthreadsafe_template_for_constructor.info)) == 0) Program received signal SIGABRT, Aborted. 0x00007ffff57173a5 in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht gefunden. in ../nptl/sysdeps/unix/sysv/linux/raise.c (gdb) call gjs_dumpstack() == Stack trace for context 0x923140 == 0 anonymous() ["/usr/share/gnome-shell/js/ui/altTab.js":54] 1 AltTabPopup() ["/usr/share/gnome-shell/js/ui/altTab.js":47] 2 anonymous("backwards" = false, "window" = null, "mask" = 8, "binding" = ""switch_windows"", "shellwm" = [object instance proxy GIName:Shell.WM jsobj@0x7fffd7a62480 native@0xa6d040]) ["/usr/share/gnome-shell/js/ui/windowManager.js":542] (gdb) quit A debugging session is active. Inferior 1 [process 2691] will be killed. Quit anyway? (y or n) y
I filed bug #663441, which has patches to remove the "unthreadsafe_constructor" stuff, but I'm still unsure why the memory is junk here.
This bug (Gnome Shell crash) happens to me many times also when to show the notification on track change of Rhythmbox.
I also have had this crash several times in the last week, but cannot recreate. Running Arch.
Hitting this playing with pynotify, not sure why/how exactly.
Hi, I'm sorry if this is not the right place to ask, but since it comes probably related to this bug I will ask anyway - to me what happens is that sometimes gnome-shell restarts spontaneously (just as if I would do Alt+F2 and run "r") but sometimes it only manages to half-restart - everything from gnome-shell closes but does not restart again and I get left only with the windows that were open. I can then use Synapse to log out and then log in again, but I don't know of a way to fix this. Is there a way to run "r" in terminal or to restart gnome-shell somehow? I'm on Oneiric.
Change to a terminal (Strg+Alt+F1...F6) and start the gnome shell from there $ DISPLAY=:0 gnome-shell --replace then switch back to the terminal your xserver runs in (usually F7, F8).
I installed gnome-shell 3.2.1 in Debian several hours ago and see no restarting or session closing. I use a few extensions and a custom shell theme. I remember that with weather extension, even gnome-shell 3.0.2 restarted randomly. Two weeks ago, I installed gnome-shell 3.2.1 for the first time and experienced shell restarting and session closing so often that I reverted to v3.0.2. I don't remember if I had any weather extension. But this time, the shell is running smoothly without weather extension. Does anyone experience this bug WITHOUT weather extension?
I still have the weather extension installed, but it is disabled. I think that since I disabled it the number of restarts decreased dramatically, but it still happens now and again, especially when the computer has a lot to think about. What happens on my computer is that sometimes the shell restarts but does not complete the restart, leaving me without the top black panel, without Alt+F2 and without the ability to switch between the open applications (Alt+Tab). Luckily synapse still works fine and I am able to open a terminal and restart the shell manually. When this happens, and the shell crashes again, I can see a message that has to do with the calendar. I don't remember it exactly but I will copy it and paste it here when it happens again.
You mean this error: ERROR:gi/object.c:671:gjs_object_instance_constructor: assertion failed: (unthreadsafe_template_for_constructor.info == NULL || strcmp(g_base_info_get_name( (GIBaseInfo*) priv->info), g_base_info_get_name( (GIBaseInfo*) unthreadsafe_template_for_constructor.info)) == 0) gnome-shell-calendar-server[8856]: Got HUP on stdin - exiting
yes, something like that, even though I think some of the messages before are different.
Here is an example (I ran gnome-shell --replace and after a few seconds it crashed again): JS LOG: GNOME Shell started at Thu Nov 17 2011 14:57:03 GMT+0100 (CET) (gnome-shell:7688): Clutter-CRITICAL **: clutter_text_get_editable: assertion `CLUTTER_IS_TEXT (self)' failed (gnome-shell:7688): Clutter-CRITICAL **: clutter_text_get_text: assertion `CLUTTER_IS_TEXT (self)' failed (gnome-shell:7688): Clutter-CRITICAL **: clutter_text_set_text: assertion `CLUTTER_IS_TEXT (self)' failed St-ERROR **: st_widget_get_theme_node called on the widget [0x9963558 StButton.status-chooser-user-icon] which is not in the stage. gnome-shell-calendar-server[7696]: Got HUP on stdin - exiting Trace/breakpoint trap Makes sense?
I always have the same trace than Ahmed on Comment #42 ERROR:gi/object.c:671:gjs_object_instance_constructor: assertion failed: (unthreadsafe_template_for_constructor.info == NULL || strcmp(g_base_info_get_name( (GIBaseInfo*) priv->info), g_base_info_get_name( (GIBaseInfo*) unthreadsafe_template_for_constructor.info)) == 0) gnome-shell-calendar-server[8856]: Got HUP on stdin - exiting
Here, the shell has worked smoothly for more than a day without a single restarting. I don't know if this is of any help but there's no "gi/object.c" or "st_widget_get_theme_node" message in my .xsession-errors but there are "Clutter-CRITICAL" messages in it, I haven't installed Evolution (I use Icedove), and I've purged (not just disabled) the weather extension and its schema file.
So far, I can only crash gnome-shell when Epiphany is running and the load is high. I've run for more than a week with Chromium and Firefox, and when I start Epiphany and up the load, gnome-shell dies. "up the load" in this case means lots of browsers or tabs, or one browser with lots of stuff. Enough to visibly slow down the machine. I haven't confirmed RAM or X11 pixmap usage yet. Epiphany isn't configured to even find flash. Gnash is installed, though. I've succesfully "up-ed the load" with the other browsers, and I've not been able to crash gnome-shell. I've also increased the more traditional load average by compiling stuff, and I haven't crashed gnome-shell. This is with 3.2.1 (Ubuntu version.) I used to think it was Ubuntu's menu override; but I've since uninstalled that and a number of other unity hacks (scrollbars, unity itself, etc.) and it's still happening. I've never used the weather extension. (sorry this information isn't more specific.)
GNOME Shell stopped crashing since I disabled the weather applet (yet it is still installed on the system) I'm using Ubuntu 11.10 (Oneiric)
I followed the Ahmed advice since yesterday and it seems to work No Gnome-shell crash without weather extension. I still have X freezing, but I suppose it's not related
me too... disabled the weather extension and no crash since the day before yesterday
There's a Fedora bug report with plenty of affected users and all the backtraces you could dream of. No Gnome/Red Hat developer seems to be investigating this AFAIK though. https://bugzilla.redhat.com/show_bug.cgi?id=725165
Where's the source for the weather extension? I can't seem to find it.
I emphasize what I said earlier: Weather extension even made GNOME-Shell 3.0.2 crash sometimes. Now it's about two weeks that I use shell 3.2.1 whithout any crash.
(In reply to comment #52) > Where's the source for the weather extension? I can't seem to find it. It's on github. https://github.com/simon04/gnome-shell-extension-weather
I've been unable to reproduce this (if anybody has a set of steps, please let me know) but I have a guess: http://magcius.mecheye.net/shell/use-native-json.patch Patch the weather extension with this patch. If you still get a crash, please let me know if it's the same one (unthreadsafe_template_for_constructor). If it appears to go away, please let me know. This means that json-glib is stomping on memory.
Jasper, the crash doesn't happen on the loading of the extension. It happens at random times. I would try your patch, but it doesn't apply against the Gnome 3.2 branch.
The "master" branch should be runnable with 3.2. Try that.
(In reply to comment #57) > The "master" branch should be runnable with 3.2. Try that. OK. It's running. I'll update you if it crashes. Thanks!
If it doesn't crash, try reverting the patch and running under valgrind's memcheck to see if it can spit out anything relevant to json-glib so we can catch the culprit and fix json-glib. See https://live.gnome.org/Valgrind for more information.
Jasper, it still crashes. It crashed just one minute ago with this written to my .xsession-errors: ERROR:gi/function.c:898:gjs_invoke_c_function: assertion failed (c_arg_pos == processed_c_args): (1 == 0)
Hm. At least that's a different error. Is this with my JSON patch, or not?
(In reply to comment #61) > Hm. At least that's a different error. Is this with my JSON patch, or not? With your patch.
*** Bug 664026 has been marked as a duplicate of this bug. ***
The problem is the code in the weather extension: load_json_async: function(url, fun) { let here = this; let session = new Soup.SessionAsync(); if (Soup.Session.prototype.add_feature != null) Soup.Session.prototype.add_feature.call(session, new Soup.ProxyResolverDefault()); let message = Soup.Message.new('GET', url); session.queue_message(message, function(session, message) { let jp = new Json.Parser(); jp.load_from_data(message.response_body.data, -1); fun.call(here, jp.get_root().get_object()); }); }, because session is only pointed to by a local variable, it can get garbage collected before the request completes. If this happens and the session is finalized, libsoup will call the callback with a status of SOUP_STATUS_CANCELLED. This will cause GJS to attempt to allocate a new proxy object for 'session'. But allocating an object during GC is forbidden and fails, and when that happens, GJS doesn't properly clean up unthreadsafe_template_for_constructor. So, two fixes are needed: * For GJS - do the cleanup properly * For the weather applet - use a singleton session object - like extensionSystem.js it should do: const _httpSession = new Soup.SessionAsync(); Soup.Session.prototype.add_feature.call(_httpSession, new Soup.ProxyResolverDefault()); at file scope.
It seems that the crash is fixed with the latest weather extension :)
(In reply to comment #65) > It seems that the crash is fixed with the latest weather extension :) Plz point out where's "the latest weather extension". simon04's is not it.
(In reply to comment #66) > Plz point out where's "the latest weather extension". > simon04's is not it. gjs 1.30.1 fixes the issue without any changes required with the extension.
> Plz point out where's "the latest weather extension".... Because of the crash, I didn't use the weather extension since gnome-shell 3.2 came out. Yesterday I got simon04's from github and I haven't encountered any crash. > gjs 1.30.1 fixes the issue... I still have gjs 1.30.0.
gjs 1.30.1 just masks the issue. https://github.com/simon04/gnome-shell-extension-weather/commit/7b9d2edb5ac7170b23e60b59b901f65546b6b6df should fix the crash for real.
Ok, this is fixed right?
(In reply to comment #70) > Ok, this is fixed right? Yes.