Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 291381 - sys-apps/devicekit-power: daemon segfaults
Summary: sys-apps/devicekit-power: daemon segfaults
Status: RESOLVED DUPLICATE of bug 315199
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Freedesktop bugs
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2009-10-31 22:14 UTC by Michael Edenfield
Modified: 2010-07-29 21:28 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Output of gnome-power-bugreport.sh (devkit-power-daemon.log,3.92 KB, text/plain)
2009-10-31 22:15 UTC, Michael Edenfield
Details
dmesg output showing segfaults. (dmesg.log,1.05 KB, text/plain)
2009-10-31 22:15 UTC, Michael Edenfield
Details
ebuild diff to filter pie (devicekit-power-013-ebuild.diff,716 bytes, patch)
2010-01-03 22:21 UTC, Jory A. Pratt
Details | Diff
Backtrace about this bug (backtrace.log,1.48 KB, text/plain)
2010-03-20 04:43 UTC, rg b
Details
Patch for devicekit-power (fix_bug.patch,1.15 KB, patch)
2010-03-24 06:23 UTC, rg b
Details | Diff
backtrace (devkit-power-daemon-014.bt,3.41 KB, text/plain)
2010-04-05 18:28 UTC, Alexey Titov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Edenfield 2009-10-31 22:14:19 UTC
The most recent gnome-power-manager appears to rely on devicekit instead of hal for reading hardware information.  Whenever it needs power/battery information, it tries to launch devkit-power-daemon, which immediately segfaults.

This is causing gnome-power-manager to treat my laptop as if it had no battery -- there is no batter meter or charge information available, and the suspend to disk/ram softkeys no longer function.

I am currently running a hardened amd64 system, but the error occurs even with PaX features disabled at the kernel level and even if I mark devkit-power-daemon with all possible PaX exclusion markings.

Reproducible: Always

Steps to Reproduce:
1. Emerge GNOE 2.28.1, including gnome-power-manager
2. Start the gnome-power-manager applet
3.

Actual Results:  
Applet indicates that the system is on AC power with no batter; segfault messages appear in dmesg output.

Expected Results:  
Applet should indicate that the battery is charging/discharging as appropriate; suspend software should function.

Portage 2.2_rc46 (hardened/linux/amd64/10.0, gcc-4.4.2, glibc-2.10.1-r0, 2.6.31-hardened-r4-platypus-3 x86_64)
=================================================================
System uname: Linux-2.6.31-hardened-r4-platypus-3-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T6400_@_2.00GHz-with-gentoo-2.0.1
Timestamp of tree: Fri, 30 Oct 2009 19:15:02 +0000
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.4, 3.1.1-r1
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.5.2-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.8.5-r3, 1.10.2, 1.11
sys-devel/binutils:  2.20
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=core2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=core2"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo http://open-systems.ufl.edu/mirrors/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise /usr/local/portage/layman/x11 /usr/local/portage/layman/hardened-development /usr/local/portage/layman/lisp"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X acpi amd64 automount bash-completion branding bzip2 cairo cli consolekit cracklib crypt cups dbus dell dri firefox gnome gtk gtk2 hardened isdnlog java java6 justify laptop lm_sensors mmx modules mudflap multilib nautilus nls nptl nptlonly offensive openmp pam pcre perl pic pppd python readline reflection samba session spl sse sse2 ssl sysfs syslog tcpd threads unicode urandom vim-syntax xml xorg xulrunner zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="mouse keyboard evdev synaptics" KERNEL="linux" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="intel" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Michael Edenfield 2009-10-31 22:15:33 UTC
Created attachment 208902 [details]
Output of gnome-power-bugreport.sh
Comment 2 Michael Edenfield 2009-10-31 22:15:50 UTC
Created attachment 208904 [details]
dmesg output showing segfaults.
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-10-31 22:53:20 UTC
a backtrace of the crash would be nice (plus version of dk-p)

http://www.gentoo.org/proj/en/qa/backtraces.xml
Comment 4 Michael Edenfield 2009-11-01 00:47:45 UTC
(In reply to comment #3)
> a backtrace of the crash would be nice (plus version of dk-p)
> 
> http://www.gentoo.org/proj/en/qa/backtraces.xml
> 

It's version 011.

And.. it appears I was too quick to dismiss my hardened setup as the culprit.  When I rebuild the daemon with -nopie on the final link stage (to get a usable backtrace), it doesn't segfault.  Is there still a gdb version that understands PIE?
Comment 5 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-11-01 17:53:30 UTC
CCing hardened since I have no clue about the specifics of hardened debugging.
Comment 6 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-11-07 19:38:55 UTC
Please try dk-p 012 and provide a backtrace, thanks.
Comment 7 Michael Edenfield 2009-11-08 01:52:52 UTC
(In reply to comment #6)
> Please try dk-p 012 and provide a backtrace, thanks.
> 

version 012 still segfaults.  Working on the backtrace.
Comment 8 Jory A. Pratt gentoo-dev 2010-01-03 21:39:34 UTC
Reopening a few of us on hardened dev team are looking into the problem
Comment 9 Jory A. Pratt gentoo-dev 2010-01-03 22:21:55 UTC
Created attachment 215094 [details, diff]
ebuild diff to filter pie

This is only a bandage until the problem is located and fixed properly.
Comment 10 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-01-06 22:43:51 UTC
without a backtrace, there's little chance the problem will get fixed. Is using -fPIE in CFLAGS something that would make us non-hardened user able to reproduce the problem ?
Comment 11 Jory A. Pratt gentoo-dev 2010-01-16 03:51:17 UTC
(In reply to comment #10)
> without a backtrace, there's little chance the problem will get fixed. Is using
> -fPIE in CFLAGS something that would make us non-hardened user able to
> reproduce the problem ?
> 

Not it won't, this is only effecting amd64 users from what I can see locally, my x86 hardened setup is fine with it. Soon as possible I will get the backtrace with a proper fix.
Comment 12 rg b 2010-03-20 04:43:41 UTC
Created attachment 224319 [details]
Backtrace about this bug
Comment 13 rg b 2010-03-24 06:23:21 UTC
Created attachment 225071 [details, diff]
Patch for devicekit-power

Solve the problem for me, replacing 0 by NULL in g_object-set; seems more compliant with amd64.
Comment 14 Alexey Titov 2010-04-05 18:26:33 UTC
sys-apps/devicekit-power-014 segfaults too.
May be this is caused by the update to gnome-2.30, but i'am not sure.

$dmesg | tail 
[11334.662974] devkit-power-da[9186]: segfault at 7f9600000000 ip 00007f963a0e31ba sp 00007fff5b5444c8 error 4 in libc-2.11.so[7f963a067000+152000]
[11854.075345] devkit-power-da[7941]: segfault at 7f1d00000000 ip 00007f1d761bf1ba sp 00007fffd098b958 error 4 in libc-2.11.so[7f1d76143000+152000]
[11854.130156] devkit-power-da[7943]: segfault at 7f9400000000 ip 00007f947f68b1ba sp 00007fff33aa06c8 error 4 in libc-2.11.so[7f947f60f000+152000]

Comment 15 Alexey Titov 2010-04-05 18:28:47 UTC
Created attachment 226659 [details]
backtrace
Comment 16 Alexey Titov 2010-04-06 17:23:05 UTC
Great, recompiling it with -O2 flag (instead of -O3) solved the problem =)
Comment 17 Samuli Suominen (RETIRED) gentoo-dev 2010-04-29 19:30:39 UTC
(In reply to comment #13)
> Created an attachment (id=225071) [details]
> Patch for devicekit-power
> 
> Solve the problem for me, replacing 0 by NULL in g_object-set; seems more
> compliant with amd64.
> 

Have you reported this to upstream? It doesn't look like it since we have also bug 315199 now.
I'm afraid anykind of auto mounting will be dead for hardened until this gets done.
Comment 18 Samuli Suominen (RETIRED) gentoo-dev 2010-04-29 19:32:52 UTC
s/auto mounting/power management/ ;-)
Comment 19 Samuli Suominen (RETIRED) gentoo-dev 2010-04-29 19:40:00 UTC
https://bugs.freedesktop.org/show_bug.cgi?id=27902
Comment 20 Samuli Suominen (RETIRED) gentoo-dev 2010-07-29 21:28:05 UTC
devicekit-power won't be fixed, but upower might (bug 315199)

*** This bug has been marked as a duplicate of bug 315199 ***