Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 318755 - xfce-extra/xfce4-sensors-plugin-1.0.0 segmentation fault
Summary: xfce-extra/xfce4-sensors-plugin-1.0.0 segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal with 2 votes (vote)
Assignee: XFCE Team
URL: http://bugzilla.xfce.org/show_bug.cgi...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-06 13:45 UTC by churchmice
Modified: 2010-12-18 18:24 UTC (History)
5 users (show)

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


Attachments
Patch which fixes segfault at the expense of possibly reduced functionality (xfce4-sensors-plugin-1.0.0-segfault.patch,586 bytes, patch)
2010-07-31 20:54 UTC, Livid
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description churchmice 2010-05-06 13:45:30 UTC
When i am trying to add xfce4-sensor-plugin to the panel ( I am using xfce4 now), i am with no luck.
The plugin would disappear, doing a "dmesg" and i found the following words:
"xfce4-sensors-p[16477]: segfault at 0 ip b6940a03 sp bfd5d45c error 4 in libc-2.11.1.so[b68c4000+164000]"

Reproducible: Always

Steps to Reproduce:
1. Right click on the xfce4 panel, select "Add New Items",a dialog box would appear
2. Select "Sensor plugin", do some customization if you like.
3. Click "Add" to add this plugin to the panel.

Actual Results:  
The plugin would disappear, actually it crashed.
You can use dmesg to see this

xfce4-sensors-p[16477]: segfault at 0 ip b6940a03 sp bfd5d45c error 4 in libc-2.11.1.so[b68c4000+164000]

Expected Results:  
The plugin is added to the panel.

my emerge info

Portage 2.1.8.3 (default/linux/x86/10.0/desktop, gcc-4.4.3, glibc-2.11.1-r0, 2.6.33-zen2 i686)
=================================================================
System uname: Linux-2.6.33-zen2-i686-Intel-R-_Core-TM-2_Duo_CPU_T7100_@_1.80GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 06 May 2010 08:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p5
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.1-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=core2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache collision-protect distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirrors.163.com/gentoo http://61.135.158.199"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US zh_CN "
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/portage/local/layman/jokey /usr/portage/local/layman/sunrise /usr/portage/local/layman/gentoo-taiwan /usr/portage/local/layman/desktop-effects /usr/portage/local/layman/gentoo-china /usr/portage/local/layman/devnull /usr/portage/local/layman/rox /usr/portage/local/layman/perl-experimental /usr/portage/local/layman/games /usr/portage/local/layman/multimedia /usr/portage/local/layman /tools/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X a52 aac aalib acpi alsa apache2 audiofile bash-completion berkdb binary-drivers bluetooth branding bzip2 cairo cdr chroot cjk cleartype cli consolekit cracklib crypt cscope ctype cups cxx dbus dri dts dvd dvdr emboss encode esd exif expat fam fastbuild fbsplash firefox flac foomaticdb force-cgi-redirect fortran ftp gd gdbm gif glut gpm gstreamer gtk gtkhtml guile hal iconv idn imlib immqt-bc ipv6 jpeg kde4 laptop lcms ldap libnotify libwww lm_sensors mad memlimit midi mikmod mmx mng modules motif mozilla mp3 mp4 mpeg mudflap mysql ncurses nls nptl nptlonly nvidia ogg openal opencl opengl openmp oss pam pango pcre pdf perl pmu png posix ppds pppd python qt3support qt4 quicktime readline reflection samba sdl session simplexml slang soap sockets spell spl sse sse2 ssl ssse3 startup-notification svg sysfs tcpd tiff tokenizer truetype unicode usb v4l v4l2 vdpau vim-syntax vorbis win32codecs wma x264 x86 xcb xcomposite xinerama xml xorg xscreensaver xsl xulrunner xv xvid xvmc 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" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US zh_CN " RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="cui gfw zhang ipset" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Viktor Yu. Kovalskii 2010-05-23 13:29:40 UTC
I have similar problem.
But dmesg says:

xfce4-sensors-p[29745]: segfault at 0 ip b6c7f1ff sp bfd90230 error 4 in libglib-2.0.so.0.2200.5[b6c27000+ca000]
xfce4-sensors-p[29860]: segfault at 0 ip b6c541ff sp bf85b970 error 4 in libglib-2.0.so.0.2200.5[b6bfc000+ca000]
xfce4-sensors-p[29921]: segfault at 0 ip b6d3e1ff sp bf8292c0 error 4 in libglib-2.0.so.0.2200.5[b6ce6000+ca000]
Comment 2 Christoph Mende (RETIRED) gentoo-dev 2010-06-11 12:43:35 UTC
please attach a gdb backtrace.

see http://www.gentoo.org/proj/en/qa/backtraces.xml and http://wiki.xfce.org/howto/panel_plugin_debug for more information.
Comment 3 Kevin J Meagher 2010-07-09 11:53:31 UTC
I get the same problem I tried to get a stack track by remerging xfce4-sensors-plugins with -ggdb and FEATURES='nostrip' and following the insturctions to get a stacktrace from an xfce plugin, it was rather unhelpful:


GNU gdb (Gentoo 7.1 p1) 7.1
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/libexec/xfce4/panel-plugins/xfce4-sensors-plugin...done.
Starting program: /usr/libexec/xfce4/panel-plugins/xfce4-sensors-plugin socket_id=0 name=xfce4-sensors-plugin-gdb id=12786759745 display_name=Sensor plugin GDB size=30 screen_position=10
[Thread debugging using libthread_db enabled]

Program exited with code 01.
No stack.
The program is not being run.

Comment 4 Christoph Mende (RETIRED) gentoo-dev 2010-07-09 14:36:17 UTC
that doesn't look like it crashed
Comment 5 Kevin J Meagher 2010-07-09 18:06:11 UTC
Yes, but from the users point of view unexpectedly exiting with error state 1 isn't any better. I forgot to mention that this is probably a hardware/driver specific bug because it started doing this after I changed motherboards on the same gentoo install. If you have any further suggestions as to how to debug this problem let me know and I will try.
Comment 6 Christoph Mende (RETIRED) gentoo-dev 2010-07-09 19:15:05 UTC
well, as long as it doesn't segfault, that's a different bug. so, please open a new bug for your issue.
Comment 7 Kevin J Meagher 2010-07-10 11:31:30 UTC
Sorry I wasn't clearer earlier.
When I run it in gdb I get the Exit with code 01 posted above. 
But, when I run it without gdb i get the same segfault:

xfce4-sensors-p[11147]: segfault at 0 ip 00007f151e5b0b52 sp 00007fff32dc11e8 error 4 in libc-2.11.2.so[7f151e534000+150000]

so it is the same bug, just running it in gdb somehow prevents the segfault an makes it exit unexpectedly.
Comment 8 Livid 2010-07-31 20:54:09 UTC
Created attachment 240879 [details, diff]
Patch which fixes segfault at the expense of possibly reduced functionality

Additional research is required. I do not have time atm.
Comment 9 Livid 2010-07-31 20:56:10 UTC
Oops, forgot to post this

Experiencing the same problem.
Attaching a temporary patch (solves the problem but possibly disables some functionality) which illustrates the problematic line. Apparently, font=0, hence the segfault when calling strlen(font).
the problematic line is lib/configuration.c line 110
Comment 10 xaraf 2010-08-23 15:57:10 UTC
Same problem here. 

tail -f /var/log/messages says:
Aug 23 17:40:42 tuxie kernel: [ 7379.401190] xfce4-sensors-p[7976]: segfault at 0 ip b6b4b693 sp bfae787c error 4 in libc-2.11.2.so[b6ad7000+143000]
immediatelly after click on "Close" button in "Add applet" dialog.

After downgrade to 0.10.99.6 I can't even start "Add applet" dialog. Running xfce4-sensors from console returns:

$ xfce4-sensors 
*** glibc detected *** xfce4-sensors: free(): invalid pointer: 0xb78235b2 ***
======= Backtrace: =========
/lib/libc.so.6(+0x6c534)[0xb71ba534]
/lib/libc.so.6(+0x6ddb3)[0xb71bbdb3]
/lib/libc.so.6(cfree+0x6d)[0xb71bed8d]
/usr/lib/libglib-2.0.so.0(g_free+0x37)[0xb72f6c77]

So potentially this is libc problem?
Comment 11 xaraf 2010-08-23 16:12:55 UTC
Livid's patch fixed problem for me also.
Comment 12 A. Person 2010-09-23 16:00:06 UTC
Same problem here.  Can we have the patch in portage?
Comment 13 shiny666 2010-11-13 01:22:03 UTC
(In reply to comment #12)
> Same problem here.  Can we have the patch in portage?
> 

agreed. from reading the patch it would be fairly trivial and better than running gkrellm just for one sensor to work.
Comment 14 shiny666 2010-11-14 21:38:32 UTC
I have confirmed that the patch by Livid works via an overlay with no other modifications.
http://pastebin.com/ddcfkrth
for the modified ebuild in full. Please update in portage.

#PATCHES=( "${FILESDIR}/${P}-missing_includedir.patch"
#  "${FILESDIR}/${P}-without_libnotify.patch"
#+ "${FILESDIR}/${P}-segfault.patch" )
Comment 15 Samuli Suominen (RETIRED) gentoo-dev 2010-12-18 18:24:50 UTC
(In reply to comment #8)
> Created an attachment (id=240879) [details]
> Patch which fixes segfault at the expense of possibly reduced functionality
> 
> Additional research is required. I do not have time atm.
> 

+*xfce4-sensors-plugin-1.0.0-r1 (18 Dec 2010)
+
+  18 Dec 2010; Samuli Suominen <ssuominen@gentoo.org>
+  +xfce4-sensors-plugin-1.0.0-r1.ebuild,
+  +files/xfce4-sensors-plugin-1.0.0-segfault_workaround.patch:
+  Apply a workaround for segfault wrt #318755 by Livid.

Please comment and continue discussion in 
http://bugzilla.xfce.org/show_bug.cgi?id=6603 instead of here so it'll get fixed for next release.