! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
gsettings: apps crash when xfconf is not available yet other backend is used
Status:
RESOLVED: FIXED

Comments

Description Michał Górny 2018-10-22 16:57:51 CEST
Our users have reported that upon upgrading xfconf to 4.13.6, applications start to crash even though other GSettings backend is being used, e.g.:

** (process:14420): CRITICAL **: 07:14:23.332: Failed to get connection to xfconfd: Error spawning command line “dbus-launch --autolaunch=296f1b93beca43369cb1c1f89da93a75 --binary-syntax --close-stderr”: Child process exited with code 1

It seems that the root cause is that g_io_module_load() is always called to query the potential module, even if user did not select the particular module to be used. Given that the giomodule attempts to connect to xfconfd, and considers connection failure fatal [1], this means that any program using GSettings (if not GLib at all) is going to crash if it can't use xfconfd.

It has been suggested to me to look at dconf for comparison. Indeed, dconf's g_io_module_load() function only registers the extension point without initializing dconf backend at all [2]. If I understand it correctly, the backend is lazily initialized on the first use. I think a similar solution needs to be implemented in xfconf's gsettings backend as well.

[1]:https://git.xfce.org/xfce/xfconf/tree/gsettings-backend/xfconf-giomodule.c#n32
[2]:https://gitlab.gnome.org/GNOME/dconf/blob/master/gsettings/dconfsettingsbackend.c#L203
Comment 1 Skunnyk editbugs 2019-04-14 19:33:58 CEST
Thank you for the informations!
Based on https://bugzilla.xfce.org/show_bug.cgi?id=15122 , I propose to disable xfconf gsetting backend by default until we can fix this issue.
Comment 2 Skunnyk editbugs 2019-04-21 22:32:12 CEST
gsetting backend is disabled by default now in #15122. 
I let this issue open, the informations present in it can be useful for whoever want to fix it :)
Comment 3 Git Bot editbugs 2020-05-02 11:16:23 CEST
Ali Abdallah referenced this bugreport in commit dc443372218d9cc4a5daf5c416d767f445f7f9ce

Initialize Xfconf when the backend is to be used

https://gitlab.xfce.org/xfce/xfconf/commit/dc443372218d9cc4a5daf5c416d767f445f7f9ce
Comment 4 Git Bot editbugs 2020-05-06 14:56:32 CEST
Ali Abdallah referenced this bugreport in commit 494c76f919d957b0cd0d10dfff5e043db92c4e64

Initialize Xfconf when the backend is to be used

https://gitlab.xfce.org/xfce/xfconf/commit/494c76f919d957b0cd0d10dfff5e043db92c4e64

Bug #14789

Reported by:
Michał Górny
Reported on: 2018-10-22
Last modified on: 2020-05-17

People

Assignee:
Ali Abdallah
CC List:
2 users

Version

Version:
4.13.6

Attachments

Additional information