Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 566464 - stage3-amd64-hardened-20151119: gcc broken after re-emerge
Summary: stage3-amd64-hardened-20151119: gcc broken after re-emerge
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-22 14:06 UTC by Alex Efros
Modified: 2019-11-03 20:59 UTC (History)
0 users

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


Attachments
sys-devel:gcc-4.9.3:20151122-134045.log (sys-devel:gcc-4.9.3:20151122-134045.log.gz,258.51 KB, application/gzip)
2015-11-22 14:07 UTC, Alex Efros
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Efros 2015-11-22 14:06:25 UTC
I've boot http://distfiles.gentoo.org/releases/amd64/autobuilds/current-install-amd64-minimal/hardened/admincd-amd64-20150924.iso, unpack http://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64-hardened/stage3-amd64-hardened-20151119.tar.bz2, chroot, did some portage and /etc setup, emerged several packages, then run `emerge -1 gcc` - and this result in non-working gcc:

# cat conftest.c 
int main() { return 0; }
# gcc conftest.c
gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.

I've restored gcc-related files from stage3's tar and gcc works ok. Then run again `emerge -1 gcc` - and gcc became broken again (but `emerge -1 gcc` has completed without errors).

I see few errors in dmesg, but they won't happens while attempt to run `gcc conftest.c`, so I suppose they happens while `emerge -1 gcc`:

[ 2899.532878] conftest[30732]: segfault at fe899f70 ip 000078b7f86eebb2 sp 00007fd5088a9c18 error 4 in libc-2.21.so[78b7f8657000+1a0000]
[ 5579.010882] cc1plus[20350]: segfault at 6afda70dd2d8 ip 00000000014ae80d sp 0000746d759423a0 error 4 in cc1plus[400000+168a000]
[ 5852.860236] cc1plus[29211]: segfault at 6faec5b00508 ip 0000000000f72397 sp 0000757e23ae7f40 error 4 in cc1plus[400000+1072000]
[ 6001.078005] cc1plus[5805]: segfault at 7b5dde371578 ip 0000000000f72397 sp 00007b97cfb49480 error 4 in cc1plus[400000+1072000]
[ 7885.177738] cc1plus[31348]: segfault at 6c2aa4ebd2d8 ip 00000000014ae80d sp 0000764527558020 error 4 in cc1plus[400000+168a000]
[ 8159.684164] cc1plus[7995]: segfault at 64bb259b4038 ip 0000000000f72397 sp 00007114a3ba5740 error 4 in cc1plus[400000+1072000]
[ 8309.396416] cc1plus[16842]: segfault at 6bdc207590a8 ip 0000000000f72397 sp 00007192546cecc0 error 4 in cc1plus[400000+1072000]

Here is content of small /var/log/portage/sys-devel:gcc-4.9.3:20151122-134044.log:

 * Package:    sys-devel/gcc-4.9.3
 * Repository: gentoo
 * Maintainer: toolchain@gentoo.org
 * USE:        abi_x86_32 cxx elibc_glibc hardened kernel_linux nls nptl openmp pie ssp userland_GNU x86
 * FEATURES:   preserve-libs sandbox userpriv usersandbox

Large /var/log/portage/sys-devel:gcc-4.9.3:20151122-134045.log attached.


Portage 2.2.20.1 (python 2.7.10-final-0, hardened/linux/x86, gcc-4.9.3, glibc-2.21-r1, 4.1.6-hardened x86_64)
=================================================================
System uname: Linux-4.1.6-hardened-x86_64-Intel-R-_Xeon-R-_CPU_X5680_@_3.33GHz-with-gentoo-2.2
KiB Mem:    16431740 total,  12943892 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 22 Nov 2015 09:15:01 +0000
sh bash 4.3_p39
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p39::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.uk.gentoo.org/gentoo-portage
    priority: -1000

powerman
    location: /var/lib/layman/powerman
    masters: gentoo
    priority: 0

local
    location: /usr/local/portage
    masters: gentoo
    priority: 1

ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage-distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --autounmask-write"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://mirror.qubenet.net/mirror/gentoo/ http://mirrors.linuxant.fr/distfiles.gentoo.org/ http://mirror.leaseweb.com/gentoo/ http://mirror.bytemark.co.uk/gentoo/ http://gentoo.modulix.net/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j25"
PKGDIR="/usr/portage-packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude ChangeLog --delete-excluded"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="adns aes bash-completion berkdb bzip2 caps cli cracklib crypt cxx dri fontconfig gdbm gif gnutls gpg hardened iconv icu idn ipv6 jpeg jpeg2k mbox mmx mmxext mng modules ncurses network-cron nls nptl openmp pam pax_kernel pcre perl pic pie png popcnt readline seccomp session spell sse sse2 sse3 sse4_1 sse4_2 ssl ssp ssse3 svg tcpd tiff truetype udev unicode urandom vim-syntax x86 xattr xtpax zlib" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="log_config vhost_alias autoindex alias rewrite dir deflate filter mime negotiation auth_basic authn_file authz_host authz_user authz_groupfile cgi actions headers env setenvif" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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 ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_conn limit_req map memcached proxy referer rewrite scgi split_clients ssi upstream_ip_hash userid uwsgi fancyindex" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 intel mach64 mga nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa via vmware 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"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 1 Alex Efros 2015-11-22 14:07:04 UTC
Created attachment 417572 [details]
sys-devel:gcc-4.9.3:20151122-134045.log
Comment 2 Alex Efros 2015-11-23 14:19:37 UTC
I've found reason for this issue: Admin CD's kernel has both CONFIG_PAX_PT_PAX_FLAGS and CONFIG_PAX_XATTR_PAX_FLAGS, but in make.conf I've set PAX_MARKINGS="XT" and because of this got this issue (with PAX_MARKINGS="PT XT" it works fine).

Minimal Install CD doesn't have PAX in kernel so it shouldn't have this issue, but I can't use it because it fail to detect my network card (bnx2).