Beryl runs fine. However, beryl-settings segfaults on start. # FEATURES="nostrip" CFLAGS="-g" CXXFLAGS="-g" emerge -1 beryl-settings [...] $ gdb beryl-settings (gdb) run [...] Program received signal SIGSEGV, Segmentation fault. 0x446330ba in strcmp () from /lib/libc.so.6 (gdb) bt full #0 0x446330ba in strcmp () from /lib/libc.so.6 No symbol table info available. #1 0x0804dca8 in set_widgets_for_setting (setting=0x807b7d8) at main.c:476 widgets = (SETOptionWidgets *) 0x8084448 b_val = 1150878148 l_val = (GSList *) 0x8066f20 i_val = 134591296 i = 0 f_val = 4.3380929443096979e+21 s_val = (const gchar *) 0x10 <Address 0x10 out of bounds> value = (BerylSettingValue *) 0x807b804 #2 0x4494c6bd in g_slist_foreach () from /usr/lib/libglib-2.0.so.0 No symbol table info available. #3 0x00000000 in ?? () No symbol table info available. $ emerge --info Portage 2.1.1-r1 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.4-r4, 2.6.18-gentoo-r2 i686) ================================================================= System uname: 2.6.18-gentoo-r2 i686 AMD Athlon(TM) XP 2000+ Gentoo Base System version 1.12.6 Last Sync: Wed, 15 Nov 2006 09:00:01 +0000 app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.3.7, 2.0.30 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.60 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r4 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-Os -pipe -march=athlon-xp -fomit-frame-pointer -falign-functions=4 -mfpmath=sse" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-Os -pipe -march=athlon-xp -fomit-frame-pointer -falign-functions=4 -mfpmath=sse" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig digest distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict userfetch" GENTOO_MIRRORS="ftp://194.117.143.71/mirrors/gentoo ftp://194.117.143.72/mirrors/gentoo ftp://mirror.icis.pcz.pl/gentoo/" LC_ALL="it_IT.UTF-8" LINGUAS="it" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X a52 aac alsa apache2 audiofile berkdb bitmap-fonts bzip2 cdparanoia cdr chroot cjk cli cracklib crypt cscope cups curl dbus dga dlloader dri dts dvb dvd dvdr dvdread elibc_glibc encode exif fam fbcon ffmpeg firefox flac flash fortran gd gdbm ggi gif ginac glut gnutls gpm gtk gtk2 gtkhtml guile hal iconv idn imagemagick imap imlib innodb input_devices_evdev input_devices_joystick input_devices_keyboard input_devices_mouse input_devices_wacom ipv6 isdnlog java javascript jikes joystick jpeg kerberos kernel_linux krb4 lcms ldap libg++ linguas_it lzo mad mcal memlimit mikmod mmx mng motif mp3 mpeg musepack mysql ncurses nls nptl nptlonly nsplugin nvidia odbc offensive ogg opengl pam pcre pdf perl plotutils png ppds pppd prelude python quicktime readline reflection samba sdl session skey slp sndfile snmp socks5 speex spl sqlite sse ssl startup-notification svg tcl tcltk tcpd theora threads tiff tk truetype truetype-fonts type1-fonts udev unicode usb userland_GNU vcd video_cards_nvidia video_cards_vesa vorbis win32codecs wmf wxwindows xml xorg xosd xprint xv xvid zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I had pre-existing config files from 0.1.1. Solution: $ rm -rf ~/.beryl* Now it works.
> Now it works. > Last famous words :P If I remove FEATURES="nostrip" CFLAGS="-g" CXXFLAGS="-g", beryl segfaults again. I did some deeper tests: # FEATURES="nostrip" CFLAGS="-Os -pipe -march=athlon-xp -falign-functions=4 -mfpmath=sse -g" emerge -1 beryl-settings Failed to read a valid object file image from memory. Program received signal SIGSEGV, Segmentation fault. 0x446330ba in strcmp () from /lib/libc.so.6 (gdb) bt full #0 0x446330ba in strcmp () from /lib/libc.so.6 No symbol table info available. #1 0x0804fb1f in set_widgets_for_setting (setting=0x80787d8) at main.c:476 widgets = (SETOptionWidgets *) 0x80ad368 b_val = <value optimized out> l_val = (GSList *) 0x8063f20 i_val = <value optimized out> i = 0 f_val = <value optimized out> s_val = (const gchar *) 0x0 value = (BerylSettingValue *) 0x8078804 #2 0x08051498 in do_if_string_choice_group (o=0x80787d8, w=0xbf87e390) at main.c:872 hbox = <value optimized out> vbox = (GtkWidget *) 0x80dd410 i = (GSList *) 0x0 widgets = (SETOptionWidgets *) 0x80ad368 #3 0x080517e9 in do_if_choice_option_group (o=0x80787d8, w=0xbf87e390) at main.c:1341 No locals. #4 0x4494c6bd in g_slist_foreach () from /usr/lib/libglib-2.0.so.0 No symbol table info available. #5 0x080ff0f0 in ?? () No symbol table info available. #6 0xbf87e3a8 in ?? () No symbol table info available. #7 0x0804df70 in do_page (group=0x0, func=0x200622, label=0x3400 <Address 0x3400 out of bounds>, notebook=0x0) at main.c:1368 z = {group = 0x0, widget = 0x0, hasany = 0} scrol = (GtkWidget *) 0x0 vbox = (GtkWidget *) 0x80787d8 settings = (GSList *) 0x8063f56 Previous frame inner to this frame (corrupt stack?) # CFLAGS="-O2 -pipe -march=athlon-xp -falign-functions=4 -mfpmath=sse -fomit-frame-pointer" emerge -1 beryl-settings this one works. The culprit is -Os.
minimal broken CFLAGS: FEATURES="nostrip" CFLAGS="-Os -g" emerge -1 beryl-settings Starting program: /usr/bin/beryl-settings Failed to read a valid object file image from memory. Program received signal SIGSEGV, Segmentation fault. 0x446330ba in strcmp () from /lib/libc.so.6 (gdb) bt #0 0x446330ba in strcmp () from /lib/libc.so.6 #1 0x0804fabc in set_widgets_for_setting (setting=0x80787d8) at main.c:476 #2 0x08051410 in do_if_string_choice_group (o=0x80787d8, w=0xbf9c54e4) at main.c:872 #3 0x0805175a in do_if_choice_option_group (o=0x80787d8, w=0xbf9c54e4) at main.c:1341 #4 0x4494c6bd in g_slist_foreach () from /usr/lib/libglib-2.0.so.0 #5 0x080ff0f0 in ?? () #6 0xbf9c54fc in ?? () #7 0x0804df4d in do_page (group=0x0, func=0x200622, label=0x3400 <Address 0x3400 out of bounds>, notebook=0x0) at main.c:1368 Previous frame inner to this frame (corrupt stack?) (gdb) bt full #0 0x446330ba in strcmp () from /lib/libc.so.6 No symbol table info available. #1 0x0804fabc in set_widgets_for_setting (setting=0x80787d8) at main.c:476 widgets = (SETOptionWidgets *) 0x80ad368 b_val = <value optimized out> l_val = (GSList *) 0x8063f20 i_val = <value optimized out> i = 0 f_val = <value optimized out> s_val = (const gchar *) 0x0 value = (BerylSettingValue *) 0x8078804 #2 0x08051410 in do_if_string_choice_group (o=0x80787d8, w=0xbf9c54e4) at main.c:872 hbox = <value optimized out> vbox = (GtkWidget *) 0x80dd410 i = (GSList *) 0x0 widgets = (SETOptionWidgets *) 0x80ad368 #3 0x0805175a in do_if_choice_option_group (o=0x80787d8, w=0xbf9c54e4) at main.c:1341 No locals. #4 0x4494c6bd in g_slist_foreach () from /usr/lib/libglib-2.0.so.0 No symbol table info available. #5 0x080ff0f0 in ?? () No symbol table info available. #6 0xbf9c54fc in ?? () No symbol table info available. #7 0x0804df4d in do_page (group=0x0, func=0x200622, label=0x3400 <Address 0x3400 out of bounds>, notebook=0x0) at main.c:1368 z = {group = 0x0, widget = 0x0, hasany = 0} scrol = (GtkWidget *) 0x0 vbox = (GtkWidget *) 0x80787d8 settings = (GSList *) 0x8063f56
upstream bug report: http://bugs.beryl-project.org/trac/ticket/995
noted thanks for the actually useful debug information. I'm happily shocked that you took the effort to build some of the relevant items with debugging. I am out of the country from tomorrow til next week so I'm not sure if I'll get to look at it before then. However, I do want to acknowledge that this has been quite helpful and I'll try and test it out to see if I can reproduce.
An annotation: seems not to apply to amd64; compiles and runs fine with -Os. None of the various CFLAG combinations I tried were able to reproduce this. Portage 2.1.1-r2 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.4-r4, 2.6.18-gentoo-r3 x86_64) ================================================================= System uname: 2.6.18-gentoo-r3 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ Gentoo Base System version 1.12.6 Last Sync: Sat, 25 Nov 2006 07:50:01 +0000 app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.3.7, 2.0.30 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.60 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r4 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -msse3 -Os -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /usr/kde/*/share/apps/kjava/kjava.policy /usr/kde/*/shutdown/agent-shutdown.sh /usr/kde/3.5/share/services/rlogin.protocol" CXXFLAGS="-march=athlon64 -msse3 -Os -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--ask --verbose" FEATURES="autoconfig buildpkg distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms suidctl userfetch userpviv" GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo http://ftp.du.se/pub/os/gentoo http://mirror.uni-c.dk/pub/gentoo http://ds.thn.htu.se/linux/gentoo http://mirror.gentoo.no/ http://distfiles.gentoo.org" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="amd64 X alsa berkdb bitmap-fonts bzip2 cli cracklib crypt cups curl dlloader dri elibc_glibc fortran gdbm gif gpm iconv input_devices_keyboard input_devices_mouse java jpeg kde kdehiddenvisibility kernel_linux libg++ ncurses nls nptl nptlonly nvidia opengl pam pcre perl ppds pppd python qt3 readline reflection session spell spl ssl tcl tcltk tcpd tetex tiff tk truetype truetype-fonts type1-fonts udev unicode userland_GNU video_cards_nvidia xcomposite xinerama xorg zlib"
(In reply to comment #6) > An annotation: > > seems not to apply to amd64; compiles and runs fine with -Os. None of the > various CFLAG combinations I tried were able to reproduce this. alas, I must disagree : I have this segfault with CFLAGS="-march=k8 -O2 -pipe -g". My bt ends in the same function but is a bit different, I'm going to attach it in the next comment. Portage 2.1.1-r2 (default-linux/amd64/2005.1, gcc-4.1.1, glibc-2.4-r4, 2.6.18-gentoo-r3 x86_64) ================================================================= System uname: 2.6.18-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.12.6 Last Sync: Mon, 27 Nov 2006 23:50:01 +0000 app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.3.7, 2.0.30 dev-lang/python: 2.3.5-r2, 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.60 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r4 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe -g" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=k8 -O2 -pipe -g" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms splitdebug strict" GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://gentoo.intergenia.de http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp.heanet.ie/pub/gentoo/" LANG="fr_FR.UTF-8" LC_ALL="fr_FR.UTF-8" LINGUAS="fr" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://niue.belnet.be/gentoo-portage" USE="amd64 X a52 aac acpi alsa avahi bash-completion berkdb bidi bitmap-fonts bzip2 cairo cdr cjk cli cracklib crypt cups dbus dlloader doc dri dts dvd eds elibc_glibc emboss encode fbcon ffmpeg firefox flac foomaticdb fortran gdbm gif gnome gpm gtk gtk2 hal iconv imlib input_devices_keyboard input_devices_mouse input_devices_synaptics ipv6 isdnlog jack jpeg kde kdeenablefinal kernel_linux linguas_fr lzw lzw-tiff mad matroska mng mono mp3 mpeg ncurses nls nptl nptlonly nvidia ogg oggvorbis opengl pam pcmcia pcre perl png postgres ppds pppd python qt qt3 qt4 quicktime readline reflection samba sdl session speex spell spl ssl svg tcpd theora tiff truetype truetype-fonts type1-fonts unicode usb userland_GNU video_cards_nv vorbis xcomposite xine xorg xpm xprint xv zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 102949 [details] backtrace for the segfault on amd64 with CFLAGS="-march=k8 -O2 -pipe -g" And as bonus the output of gdb before the segfault : Starting program: /usr/bin/beryl-settings [Thread debugging using libthread_db enabled] [New Thread 47548524165488 (LWP 23292)] Error while reading shared library symbols: Cannot find new threads: generic error touch: ne peut faire un touch sur `/home/bruno/.beryl/settings.profile': Aucun fichier ou r
Created attachment 102949 [details] backtrace for the segfault on amd64 with CFLAGS="-march=k8 -O2 -pipe -g" And as bonus the output of gdb before the segfault : Starting program: /usr/bin/beryl-settings [Thread debugging using libthread_db enabled] [New Thread 47548524165488 (LWP 23292)] Error while reading shared library symbols: Cannot find new threads: generic error touch: ne peut faire un touch sur `/home/bruno/.beryl/settings.profile': Aucun fichier ou répertoire de ce type touch: ne peut faire un touch sur `/home/bruno/.beryl/settings1.Profile': Aucun fichier ou répertoire de ce type ln: creating symbolic link `/home/bruno/.beryl/settings': Aucun fichier ou répertoire de ce type Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 47548524165488 (LWP 23292)] 0x00002b3ebfd078a2 in strcmp () from /lib/libc.so.6
Work around for me : mkdir ~/.beryl then launch beryl-settings : it will segfault again. then try again to launch beryl-settings ... success !
I am unable to reproduce this and my entire system runs -Os...
(In reply to comment #10) > I am unable to reproduce this and my entire system runs -Os... > is this a a reason enough to decide not to filter out -Os and replace it with -O2? Maybe you have some slightly different library? Or something else caused by <insert chaos law phenomena here>? Sure, we should just face that it's an unstable package, but why in heaven not remove one demonstrated cause of instability?
new upstream bug-report (all old bug reports got wiped by a system crash): http://bugs.beryl-project.org/ticket/189
Filtering is not going to happen when its something that can't be reproduced reliably, or at all for me. If everyone was experiencing it then yes it might call for it. However it seems to be isolated cases with -Os -O2 in some cases, and with varying results of it working and not working at times. Its much like a phantom that comes in on occassions and knocks over a cup of flour, its not nightly but it does happen. So there is something amiss...however if I can't reproduce it I can't actually figure out what is failing even with useful backtraces as given. Maybe upstream will be able to reproduce but as I can't...there's not a chance for me to be able to actually fix something that I can't find and make on my own machines broken.