Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 362391 - sys-libs/glibc-2.13-r2 built with gcc-4.6 makes 32bit apps segfault
Summary: sys-libs/glibc-2.13-r2 built with gcc-4.6 makes 32bit apps segfault
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-4.6
  Show dependency tree
 
Reported: 2011-04-07 06:06 UTC by Justin Lecher (RETIRED)
Modified: 2011-05-11 20:26 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2011-04-07 06:06:21 UTC
If rebuild with gcc-4.5 same setup is fine again. So it is definetly the combination of gcc-4.6 with glibc. I didn't test any other glibc version. For me only 32bit binary packages like acroread segf, but xarthisius reported that all apps which open X windows die. Interestingly, when starting the acroread or other apps in gdb they run fine.


$ einfo sys-devel/gcc:4.6
Portage 2.2.0_alpha29 (unavailable, gcc-4.5.2-asneeded, glibc-2.13-r2, 2.6.38-lh-r1 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.38-lh-r1-x86_64-Intel-R-_Core-TM-_i7_CPU_860_@_2.80GHz-with-gentoo-2.0.2
Timestamp of tree: Unknown
ccache version 3.1.4 [enabled]
dev-lang/python:     2.6.6-r2::gentoo, 2.7.1-r1::gentoo, 3.1.3-r1::gentoo
sys-devel/autoconf:  2.13::gentoo, 2.68::gentoo
sys-devel/automake:  1.9.6-r3::gentoo, 1.10.3::gentoo, 1.11.1::gentoo
sys-devel/binutils:  2.21::gentoo
sys-devel/libtool:   2.4-r1::last-hope
virtual/os-headers:  2.6.38::gentoo (sys-kernel/linux-headers)
Repositories: x-portage sunrise dummy science last-hope g-ctan
Installed sets: 
ACCEPT_LICENSE="*"
CFLAGS="-O2 -pipe -march=core2 -mcx16 -msahf -mpopcnt -msse4.2 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=core2 -frecord-gcc-switches -g -Wimplicit-function-declaration"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/nano/ /usr/share/openvpn/easy-rsa /var/lib/hsqldb /var/spool/torque"
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/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=core2 -mcx16 -msahf -mpopcnt -msse4.2 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=core2 -frecord-gcc-switches -g -Wenum-compare"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-t --jobs=12 --load-average=12 --keep-going"
FEATURES="assume-digests binpkg-logs buildsyspkg ccache collision-protect distlocks fixlafiles fixpackages metadata-transfer multilib-strict news noinfo parallel-fetch preserve-libs protect-owned sandbox sfperms sign split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS=" http://gentoo.j-schmitz.net/mirror/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo/"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/data/local/sunrise/reviewed /data/local/dummy /data/local/sci /data/local/lh/ebuilds /data/local/g-ctan"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit 7zip X acpi additions alsa arpwarp atlas bash-completion blas branding c++ cairo caps cblas ccache cleartype command-args consolekit corefonts cupsddk custom-optimization cxx dbus dts exif fbcondecor gif glibc-omitfp gmp gnome gnome-keyring graphics gstreamer gtk hddtemp icu ios ipod javascript jpeg kqemu lapack largefile lcms ldap libnotify libsexy lm_sensors lzma mailtrain md5sum mmx mng mp3 multiuser nagios-dns nagios-ntp nagios-ping nagios-ssh nano-syntax network-cron nis nsplugin objc objc++ opengl openntpd pam pdf png policykit pymol qt-static qt3support rrdcgi rrdtool science sensord smp sqlite sqlite3 sse sse2 startup-notification svg system-sqlite threads tiff truetype type1 udev x264 xcb xcomposite xinerama xulrunner" 
Unset:  ACCEPT_KEYWORDS, PORTAGE_BUNZIP2_COMMAND

=================================================================
                        Package Settings
=================================================================

sys-devel/gcc-4.6.0 was built with the following:
USE="fortran graphite mudflap multilib nls nptl objc objc++ openmp -altivec -bootstrap -build -doc -fixed-point -gcj -go -gtk -hardened -libffi -multislot -n32 -n64 -nocxx -nopie -nossp -objc-gc -test -vanilla"
CFLAGS="-O2 -pipe -march=core2 -mtune=core2 -g -Wimplicit-function-declaration"
CXXFLAGS="-O2 -pipe -march=core2 -mtune=core2 -g -Wenum-compare"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common"
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2011-04-07 22:43:07 UTC
i noticed this when emerging emul-linux-x86-gtklibs.  the call to gtk-query-immodules-2.0-32 in pkg_postinst segfaults.

$ gtk-query-immodules-2.0-32
# GTK+ Input Method Modules file
# Automatically generated file, do not edit
# Created by gtk-query-immodules-2.0-32 from gtk+-2.22.1
#
Segmentation fault

running it through gdb prevents it.  dmesg says:

gtk-query-immod[807]: segfault at c ip 0000000041f3036e sp 00000000fff4bfac error 4 in ld-2.13.so[41f2d000+f000]
Comment 2 Marc Burkhardt 2011-04-17 06:11:17 UTC
Hey all,

I have 

[I] sys-libs/glibc
     Available versions:  (2.2) (~)2.9_p20081201-r3!s 2.10.1-r1!s 2.11.3!s (~)2.12.1-r3!s (~)2.12.2!s (~)2.13-r2!s
	{crosscompile_opts_headers-only debug gd glibc-omitfp hardened multilib nls profile selinux vanilla}
     Installed versions:  2.13-r2(2.2)!s(15:46:07 28.03.2011)(gd glibc-omitfp nls -crosscompile_opts_headers-only -debug -hardened -multilib -profile -selinux -vanilla)
     Homepage:            http://www.gnu.org/software/libc/libc.html
     Description:         GNU libc6 (also called glibc2) C library

installed and compild with 

     Installed versions:  4.4.5(4.4)!s(02:53:52 19.10.2010)(fortran gcj gtk mudflap multislot nls nopie nptl objc objc++ openmp test -altivec -bootstrap -build -doc -fixed-point -graphite -hardened -libffi -multilib -n32 -n64 -nocxx -nossp -objc-gc -vanilla) 4.5.2(4.5)!s(15:47:44 28.12.2010)(fortran gcj graphite gtk mudflap multislot nls nopie nptl objc objc++ openmp test -altivec -bootstrap -build -doc -fixed-point -hardened -libffi -lto -multilib -n32 -n64 -nocxx -nossp -objc-gc -vanilla) 4.6.0_pre9999(4.6-svn)!s[2](22:51:34 12.04.2011)(fortran gcj graphite gtk mudflap multislot nls nptl objc objc++ openmp test -altivec -bootstrap -build -debug -doc -fixed-point -go -hardened -libffi -multilib -n32 -n64 -nocxx -objc-gc -offline -vanilla)
     Homepage:            http://gcc.gnu.org/
     Description:         The GNU Compiler Collection.

the gcc 4.6_branch (updated again on 22:51:34 12.04.2011) and compile a 32 bit env with 

CFLAGS="-march=corei7 -mcx16 -msahf -maes -mpclmul -mpopcnt -msse4.2 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=corei7 -m32 -O2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -mfpmath=both -ffast-math -fprefetch-loop-arrays -ftree-vectorize -fomit-frame-pointer -finline-functions -funit-at-a-time -falign-functions -falign-jumps -falign-loops -falign-labels -ffunction-sections -fdata-sections -freorder-blocks -freorder-blocks-and-partition -freorder-functions -pipe -Wdisabled-optimization"

and I have no problems. What binutils version do you use?
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2011-04-17 08:24:14 UTC
sys-devel/binutils-2.21
Comment 4 Justin Lecher (RETIRED) gentoo-dev 2011-04-20 06:39:14 UTC
Do we know the source of this problem yet?
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2011-04-20 06:45:26 UTC
Strangely enough I can't reproduce this anymore on either of my systems.
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2011-04-20 06:49:46 UTC
okay I will give it another try.
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2011-04-20 10:16:34 UTC
I am not able to reproduce it anymore. Keeping the bug still open, because it really has to be gone.
Comment 8 SpanKY gentoo-dev 2011-05-11 20:26:21 UTC
works for me now too ...