! 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 !
xfsettingsd segfault because upower doesn't run because dbus_daemon isn't run...
Status:
RESOLVED: MOVED
Product:
Xfce4-settings
Component:
Xfsettingsd

Comments

Description Daniel Jakots 2015-03-29 13:47:36 CEST
Hi,

I run OpenBSD -current amd64.

I upgraded to xfce 4.12 and then xfsettingsd segfaulted. The trace was: 
#0  0x00001959bf357ccd in up_client_glue_get_lid_is_closed () from /usr/local/lib/libupower-glib.so.1.0

If I run upower -d I had 
(upower:13761): libupower-glib-WARNING **: Couldn't connect to proxy: Impossible de se connecter : No such file or directory 
(upower:13761): GLib-GIO-CRITICAL **: g_dbus_proxy_call_sync_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed 
Segmentation fault (core dumped)
(sorry for the mix of French message and UTF-8 garbage)

I only had 
/usr/local/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session 
and 
/usr/local/bin/dbus-launch --sh-syntax --exit-with-session xfce4-session
running.

Then I run sudo /etc/rc.d/dbus_daemon start && upower -d

and it works, so I added to /etc/rc.conf.local
dbus_daemon_flags=
pkg_scripts="dbus_daemon"
and after rebooting xfsettingsd worked correctly.

Of course, all of this was found thanks to Landry :)
Comment 1 Landry Breuil editbugs 2015-03-29 13:55:49 CEST
So what this means is xfsettingsd or upower-glib doesnt handle well a missing upowerd running.. would be nice to have the full trace to see which xfsettingsd function calls upower, and if it should check first for upower presence on the dbus.
Comment 2 Landry Breuil editbugs 2015-03-29 14:27:10 CEST
Only calls are in http://git.xfce.org/xfce/xfce4-settings/tree/xfsettingsd/displays-upower.c#n103 and http://git.xfce.org/xfce/xfce4-settings/tree/xfsettingsd/displays-upower.c#n153. Maybe should check for client object validity before using it ?

Or maybe that's specific to the openbsd backend in upower which doesnt handle well some fallback codepaths and up_client crashing on it..
Comment 3 Mikhail Efremov 2016-08-03 17:00:12 CEST
Created attachment 6764 
0001-Fix-segfault-when-upowerd-is-not-running.patch

Attached patch should fix this issue.  Note that it is relies on changes (/?id=932a6a39e35754be571e1274aec4730fd42dba13) in the upower > 0.99.4, which is not released yet.
Comment 4 Mikhail Efremov 2016-08-03 17:03:57 CEST
(In reply to Mikhail Efremov from comment #3)
> (/?id=932a6a39e35754be571e1274aec4730fd42dba13)

Wrong url, sorry. The right one is
https://cgit.freedesktop.org/upower/commit/?id=932a6a39e35754be571e1274aec4730fd42dba13
Comment 5 Landry Breuil editbugs 2016-08-31 13:00:12 CEST
I've tested the patch in comment 3 (along the upower patch) and it indeed does the right thing. Sean, what do you think about it ?
Comment 6 Git Bot editbugs 2020-05-28 23:02:45 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-settings/-/issues/60.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #11773

Reported by:
Daniel Jakots
Reported on: 2015-03-29
Last modified on: 2020-05-28

People

Assignee:
Nick Schermer
CC List:
5 users

Version

Version:
4.12.0

Attachments

Additional information