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 756958 - segfaults when unloaded
segfaults when unloaded
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: xsettings
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2015-10-22 11:27 UTC by Sebastien Bacher
Modified: 2015-10-22 15:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
disconnect signal from plugin_settings (951 bytes, patch)
2015-10-22 11:28 UTC, Sebastien Bacher
none Details | Review
xsettings: Fix segfault when unloading plugin (1.02 KB, patch)
2015-10-22 15:08 UTC, Sebastien Bacher
committed Details | Review
settings: don't call xft_callback() on "active" key changes (1.08 KB, patch)
2015-10-22 15:09 UTC, Sebastien Bacher
committed Details | Review

Description Sebastien Bacher 2015-10-22 11:27:33 UTC
gnome-settings-daemon segfaults when unloaded the xsettings plugin

"#0  0xffffffff in xsettings_manager_set_setting (name=0xb1375ab3 "Xft/Antialias", tier=0, value=0x823bd98, manager=<optimized out>, manager=<optimized out>)
    at xsettings-manager.c:209
  • #1 xsettings_manager_set_int
    at xsettings-manager.c line 229
  • #2 update_xft_settings
    at gsd-xsettings-manager.c line 755
  • #3 update_xft_settings
    at gsd-xsettings-manager.c line 850
  • #4 plugin_callback
    at gsd-xsettings-manager.c line 861
  • #5 plugin_callback
    at gsd-xsettings-manager.c line 891
  • #6 g_cclosure_marshal_VOID__STRINGv
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./gobject/gmarshal.c line 1794
  • #7 _g_closure_invoke_va
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./gobject/gclosure.c line 864
  • #8 g_signal_emit_valist
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./gobject/gsignal.c line 3292
  • #9 g_signal_emit
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./gobject/gsignal.c line 3439
  • #10 g_settings_real_change_event
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./gio/gsettings.c line 386
  • #11 ffi_call_SYSV
    at ../src/x86/sysv.S line 65
  • #12 ffi_call
    at ../src/x86/ffi.c line 389
  • #13 g_cclosure_marshal_generic_va
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./gobject/gclosure.c line 1600
  • #14 g_type_class_meta_marshalv
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./gobject/gclosure.c line 1021
  • #15 _g_closure_invoke_va
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./gobject/gclosure.c line 864
  • #16 g_signal_emit_valist
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./gobject/gsignal.c line 3292
  • #17 g_signal_emit
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./gobject/gsignal.c line 3439
  • #18 settings_backend_changed
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./gio/gsettings.c line 446
  • #19 g_settings_backend_invoke_closure
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./gio/gsettingsbackend.c line 267
  • #20 g_idle_dispatch
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./glib/gmain.c line 5441
  • #21 g_main_context_dispatch
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./glib/gmain.c line 3154
  • #22 g_main_context_dispatch
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./glib/gmain.c line 3769
  • #23 g_main_context_iterate
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./glib/gmain.c line 3840
  • #24 g_main_loop_run
    at /build/glib2.0-G_esY6/glib2.0-2.46.1/./glib/gmain.c line 4034
  • #25 gtk_main
    at /build/gtk+3.0-z00SFq/gtk+3.0-3.16.7/./gtk/gtkmain.c line 1219
  • #26 main
    at main.c line 425

Comment 1 Sebastien Bacher 2015-10-22 11:28:36 UTC
Created attachment 313856 [details] [review]
disconnect signal from plugin_settings
Comment 2 Rui Matos 2015-10-22 12:00:06 UTC
Review of attachment 313856 [details] [review]:

this is fine but plugin_callback() shouldn't be calling xft_callback() for the "active" key. care to provide a patch for that too?
Comment 3 Bastien Nocera 2015-10-22 12:45:06 UTC
Review of attachment 313856 [details] [review]:

> xsettings: disconnect signal from plugin_settings, fix segfault on unload

That's too long a commit subject. Please split this, and keep the consequence of the fix in the subject, for example:
xsettings: Fix segfault when unloading plugin

Disconnect the signal from plugin_settings when unloading the plugin
so it's not called after the plugin has been freed.
Comment 4 Sebastien Bacher 2015-10-22 15:08:51 UTC
Created attachment 313867 [details] [review]
xsettings: Fix segfault when unloading plugin
Comment 5 Sebastien Bacher 2015-10-22 15:09:33 UTC
Created attachment 313868 [details] [review]
settings: don't call xft_callback() on "active" key changes
Comment 6 Bastien Nocera 2015-10-22 15:10:15 UTC
Review of attachment 313867 [details] [review]:

Looks good, thanks. Please cherry-pick to gnome-3-18 and gnome-3-16 as well.
Comment 7 Bastien Nocera 2015-10-22 15:11:12 UTC
Review of attachment 313868 [details] [review]:

> xsettings: don't call xft_callback() on "active" key changes

"Don't". Looks good to me otherwise.
Comment 9 Sebastien Bacher 2015-10-22 15:42:53 UTC
Review of attachment 313867 [details] [review]:

commit
Comment 10 Sebastien Bacher 2015-10-22 15:43:24 UTC
Review of attachment 313868 [details] [review]:

commited (with the description change requested)