Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 419873

Summary: app-portage/eix-0.25.5: SIGSEGV if USE debug is disabled
Product: Gentoo Linux Reporter: Nikoli <nikoli>
Component: Current packagesAssignee: Martin Väth <martin>
Status: RESOLVED CANTFIX    
Severity: normal CC: darkside
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Nikoli 2012-06-06 09:27:18 UTC
After rebuilding world with hardened gcc-4.6.3 eix crashes with SIGSEGV, no messages in dmesg.

# LANG=C eix eix
Received SIGSEGV - you probably found a bug in eix.
Please proceed with the following few instructions and help us find the bug:
 * install gdb (sys-dev/gdb)
 * reemerge eix with FEATURES="nostrip" USE="debug"
   or with FEATURES="nostrip" CXXFLAGS="-g -ggdb3" LDFLAGS=""
 * enter gdb with "gdb --args eix your_arguments_for_eix"
 * type "run" and wait for the segfault to happen
 * type "bt" to get a backtrace (this helps us a lot)
 * post a bugreport and be sure to include the output from gdb ..

Sorry for the inconvenience and thanks in advance!


But after 'FEATURES="nostrip" USE="debug" emerge -Dv eix' it works fine.

'FEATURES="nostrip" emerge -Dv eix' crashes:
(gdb) run
Starting program: /usr/bin/eix eix
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x33bd993b000

Program received signal SIGSEGV, Segmentation fault.
0x0000033bd921680c in ?? ()
(gdb) bt
#0  0x0000033bd921680c in ?? ()
#1  0x000000000000000c in ?? ()
#2  0x0000033bd92152c9 in ?? ()
#3  0x0000006995b8ec68 in ?? ()
#4  0x0000033bd916ae60 in ?? ()
#5  0x0000006995b27118 in ?? ()
#6  0x00000069944ecb13 in OverlayIdent::readLabel(char const*) ()
#7  0x0000000000000000 in ?? ()



Portage 2.1.10.49 (hardened/linux/amd64/no-multilib, gcc-4.6.3, glibc-2.14.1-r3, 3.3.7-hardened-r1 x86_64)
=================================================================
Timestamp of tree: Mon, 04 Jun 2012 23:15:02 +0000
app-shells/bash:          4.2_p20
dev-lang/python:          2.7.3-r1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.2
sys-apps/sandbox:         2.5
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo nikoli
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=atom -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/openvpn/easy-rsa /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=atom -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS=""
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages/atom-hardened"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/nikoli"
USE="X a52 aac acl acpi alsa amd64 amr audiofile bash-completion bzip2 cairo caps cdda cdr celt cli consolekit cracklib crypt css cxx dbus djvu dri dts dv dvd dvdr egl exif fat ffmpeg flac fluidsynth fontconfig fortran gd geoip gif gmp gnutls gphoto2 gpm graphviz gsm hardened iconv icu id3tag idn ilbc imap imlib ipv6 jbig jpeg jpeg2k justify kde lcms libnotify libproxy libsamplerate lm_sensors lzma lzo mac mad matroska mikmod mmx mmxext mng modplug modules mp3 mp4 mpeg mtp mudflap musepack musicbrainz ncurses nls nptl nptlonly ntfs ogg openexr opengl openmp pam pango pax_kernel pcre pdf pg-intdatetime pm-utils png policykit pppd qt3support qt4 quicktime raw readline reiserfs replaygain sasl schroedinger session sid smp sndfile socks5 speex sqlite sse sse2 sse3 ssl ssse3 startup-notification svg symlink sysfs taglib theora threads thumbnail tiff truetype tta udev unicode upnp usb vaapi vcd vdpau vorbis wavpack webkit webp wma wmf xattr xcb xcomposite xface xinerama xml xmp xorg xpm xscreensaver xv xvid xz zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru en" NGINX_MODULES_HTTP="access auth_basic autoindex fastcgi gzip rewrite" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Comment 1 Martin Väth 2012-06-06 16:04:02 UTC
I cannot reproduce this here on amd64 (multilib) with not fully PAX kernel.
There was a bump on gcc's pie on June 04, maybe recompiling gcc with the
current patchset helps?  Does it work with a kernel without PAX?

Do you get a more reasonable backtrace if instead of USE=DEBUG you use
FEATURES="nostrip" CXXFLAGS="-O2 -g -ggdb3" LDFLAGS="" emerge -1 eix

In any case, please post the active USE-flags for eix (last lines of
emerge --info eix) and the CXXFLAGS/LDFLAGS actually used
(thel ines shown in emerge's install log near the end of the configure phase).
Comment 2 Nikoli 2012-06-06 20:33:32 UTC
USE="dep nls sqlite strong-optimization test -debug -doc -optimization -security -tools -zsh-completion"


CXXFLAGS: -O2 -g -ggdb3
PREPEND_CXXFLAGS: -fomit-frame-pointer -fno-common -fnothrow-opt -frename-registers -fstrict-aliasing -fmerge-all-constants -funsafe-loop-optimizations -finline-functions -fgcse-sm -fgcse-las -fgcse-after-reload -fpredictive-commoning -ftree-switch-conversion -fno-ident -fvisibility=hidden -fvisibility-inlines-hidden -flto -flto-partition=none -fweb -ftree-vectorize -fno-enforce-eh-specs -fwhole-program -DNDEBUG -DNO_DEBUG -DG_DISABLE_ASSERT

LDFLAGS: 
PREPEND_LDFLAGS: -Wl,-O1 -Wl,--relax -Wl,--as-needed -Wl,--sort-common -Wl,-z,combreloc -Wl,-O9 -flto -flto-partition=none -fwhole-program -Wl,-z,noexecstack -fomit-frame-pointer -fno-common -fnothrow-opt -frename-registers -fstrict-aliasing -fmerge-all-constants -funsafe-loop-optimizations -finline-functions -fgcse-sm -fgcse-las -fgcse-after-reload -fpredictive-commoning -ftree-switch-conversion -fno-ident -fvisibility=hidden -fvisibility-inlines-hidden -flto -flto-partition=none -fweb -ftree-vectorize -fno-enforce-eh-specs -fwhole-program -DNDEBUG -DNO_DEBUG -DG_DISABLE_ASSERT -DG_DISABLE_ASSERT -DNO_DEBUG -DNDEBUG -fwhole-program -fno-enforce-eh-specs -ftree-vectorize -fweb -flto-partition=none -flto -fvisibility-inlines-hidden -fvisibility=hidden -fno-ident -ftree-switch-conversion -fpredictive-commoning -fgcse-after-reload -fgcse-las -fgcse-sm -finline-functions -funsafe-loop-optimizations -fmerge-all-constants -fstrict-aliasing -frename-registers -fnothrow-opt -fno-common -fomit-frame-pointer -O2 -g -ggdb3


(gdb) run
Starting program: /usr/bin/eix eix
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x366e1102000

Program received signal SIGSEGV, Segmentation fault.
0x00000366e09dd80c in ?? ()
(gdb) bt
#0  0x00000366e09dd80c in ?? ()
#1  0x000000000000000c in ?? ()
#2  0x00000366e09dc2c9 in ?? ()
#3  0x0000002f4fb2af58 in ?? ()
#4  0x00000366e0931e60 in ?? ()
#5  0x0000002f4fac2a98 in ?? ()
#6  0x0000002f4f6a7940 in OverlayIdent::readLabel (this=0x2f4fac2aa8, Path=<optimized out>) at /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4/bits/basic_string.h:542
#7  0x0000000000000000 in ?? ()
(gdb) 


Started rebuilding gcc.
Comment 3 Nikoli 2012-06-07 05:17:45 UTC
Rebuilding gcc did not help.
Comment 4 Martin Väth 2012-06-07 15:03:56 UTC
I can reproduce it now (I was not expecting that you use strong-opzimization;
this is the reason why it works with USE=debug: Among others, this
disables strong-optimization...)

The problem is apparently that gcc-4.6.3[hardened] breaks badly with LTO in
some cases (but not in some minimal test cases, so that I am not able to
build a ./configure test to detect this breakage automatically).

The only solution I can offer is that you use only USE=optimization
(instead of USE=strong-optimization) when compiling eix
(vanilla gcc with USE="strong-optimization security" works also)
Comment 5 Nikoli 2012-06-08 15:24:14 UTC
Thanks, rebuilding with strong-opzimization disabled helped. USE opzimization was enabled.