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 766410 - gnome-shell crashes while install gnome-clocks
gnome-shell crashes while install gnome-clocks
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: calendar
3.20.x
Other Linux
: Normal critical
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks: 754031
 
 
Reported: 2016-05-14 06:20 UTC by darkxst
Modified: 2017-02-27 19:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
util: Add AppSettingsMonitor (4.04 KB, patch)
2017-02-27 15:40 UTC, Florian Müllner
committed Details | Review
dateMenu: Use AppSettingsMonitor for world clocks (3.54 KB, patch)
2017-02-27 15:42 UTC, Florian Müllner
committed Details | Review

Description darkxst 2016-05-14 06:20:02 UTC
We are seeing this crash on Ubuntu GNOME for 3.18 and 3.20 when installing gnome-clocks. 

Looking at the code it looks like there could be a race condition between the files being installed and the schemas compiled

Stacktrace

  • #0 _g_log_abort
    at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmessages.c line 325
  • #1 g_logv
    at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmessages.c line 1080
  • #2 g_log
    at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmessages.c line 1119
  • #3 g_settings_set_property
    at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gio/gsettings.c line 590
  • #4 object_set_property
    at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gobject/gobject.c line 1421
  • #5 g_object_new_internal
    at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gobject/gobject.c line 1815
  • #6 g_object_newv
    at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gobject/gobject.c line 1924
  • #7 object_instance_init
    at gi/object.cpp line 1272
  • #8 init_func
    at gi/object.cpp line 1858
  • #9 js::CallJSNative
    at ./jscntxtinlines.h line 321
  • #10 js::Invoke
    at /build/mozjs24-aUzIx7/mozjs24-24.2.0/js/src/vm/Interpreter.cpp line 481
  • #11 js::Invoke
    at /build/mozjs24-aUzIx7/mozjs24-24.2.0/js/src/vm/Interpreter.cpp line 531
  • #12 JS_CallFunctionValue
    at /build/mozjs24-aUzIx7/mozjs24-24.2.0/js/src/jsapi.cpp line 5635
  • #13 gjs_call_function_value
    at gjs/jsapi-util.cpp line 724
  • #14 gjs_object_instance_constructor
    at gi/object.cpp line 1352
  • #15 js::CallJSNative
    at ./jscntxtinlines.h line 321
  • #16 js::CallJSNativeConstructor
    at ./jscntxtinlines.h line 354
  • #17 js::InvokeConstructor
    at /build/mozjs24-aUzIx7/mozjs24-24.2.0/js/src/vm/Interpreter.cpp line 553
  • #18 Interpret
    at /build/mozjs24-aUzIx7/mozjs24-24.2.0/js/src/vm/Interpreter.cpp line 2295
  • #19 js::RunScript
    at /build/mozjs24-aUzIx7/mozjs24-24.2.0/js/src/vm/Interpreter.cpp line 438
  • #20 js::Invoke
    at /build/mozjs24-aUzIx7/mozjs24-24.2.0/js/src/vm/Interpreter.cpp line 500
  • #21 js_fun_apply
    at /build/mozjs24-aUzIx7/mozjs24-24.2.0/js/src/jsfun.cpp line 982
  • #22 js::CallJSNative
    at ./jscntxtinlines.h line 321
  • #23 js::Invoke
    at /build/mozjs24-aUzIx7/mozjs24-24.2.0/js/src/vm/Interpreter.cpp line 481
  • #24 js::Invoke
    at /build/mozjs24-aUzIx7/mozjs24-24.2.0/js/src/vm/Interpreter.cpp line 531
  • #25 js::jit::DoCallFallback
    at /build/mozjs24-aUzIx7/mozjs24-24.2.0/js/src/jit/BaselineIC.cpp line 7007
  • #26 ??
  • #27 ??
  • #28 ??
  • #29 ??
  • #30 ??
  • #31 js::jit::CreateThisInfo
    from /srv/daisy.ubuntu.com/production/cache/Ubuntu
  • #32 ??
  • #33 ??
  • #34 ??
  • #35 ??
  • #36 ??
  • #37 ??
  • #38 ??
  • #39 ??
  • #40 ??
  • #41 ??
  • #42 ??
  • #43 ??
  • #44 ??
  • #45 ??
  • #46 ??
  • #47 ??
  • #48 ??
  • #49 ??
  • #50 ??
  • #51 ??
  • #52 ??
  • #53 ??
  • #54 ??
  • #55 ??
  • #56 ??
  • #57 ??
  • #58 ??

Comment 1 Mathieu Bridon 2016-08-28 15:05:43 UTC
Seeing this too on Fedora 24 with gnome-shell-3.20.4-1.fc24.x86_64
Comment 2 Florian Müllner 2017-02-27 15:40:52 UTC
Created attachment 346831 [details] [review]
util: Add AppSettingsMonitor

When integrating with optional components like Clocks, it is not safe
to access their GSettings right after the application became visible
to the AppSystem:
Installation is usually not atomic, so the .desktop file may appear
before the settings schema, in which case Gio will abort due to an
"invalid" schema ID.
To address this, add a small helper class that wraps the settings
access in a safe way.
Comment 3 Florian Müllner 2017-02-27 15:42:39 UTC
Created attachment 346832 [details] [review]
dateMenu: Use AppSettingsMonitor for world clocks

When gnome-clocks is installed, there is currently a race between the
GSettings schema being added to the database and the world clocks
session trying to use it. The prize if we win that race is an abort
in GIO, so use the newly added AppSettingsMonitor skip the race
altogether.
Comment 4 Rui Matos 2017-02-27 17:36:24 UTC
Review of attachment 346831 [details] [review]:

nifty
Comment 5 Rui Matos 2017-02-27 17:36:32 UTC
Review of attachment 346832 [details] [review]:

looks fine
Comment 6 Florian Müllner 2017-02-27 19:03:22 UTC
Attachment 346831 [details] pushed as b5130c5 - util: Add AppSettingsMonitor
Attachment 346832 [details] pushed as 0353ebd - dateMenu: Use AppSettingsMonitor for world clocks