Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
segfault while emerging gcc
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message

Joined: 06 Dec 2005
Posts: 444

PostPosted: Mon Feb 03, 2014 5:46 pm    Post subject: segfault while emerging gcc Reply with quote

Hello, during a recent upgrade of gcc I saw this in dmesg:
[3104318.666731] cc1plus[31132]: segfault at 30c3cb76500 ip 00000000011226a1 sp 000003a391dfd1e0 error 4 in cc1plus[400000+1198000]
[3104385.153745] cc1plus[7584]: segfault at 324988b2600 ip 00000000011226a1 sp 000003ef776ef520 error 4 in cc1plus[400000+1198000]

However, emerge doesn't complain. In fact it doesn't seem to mind. Is this a problem?

I'm currently rebuilding the toolchain to see if that stops it.

emerge --info
Portage 2.2.7 (hardened/linux/amd64, gcc-4.7.3, glibc-2.17, 3.11.7-hardened-r1 x86_64)
System uname: Linux-3.11.7-hardened-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T5270_@_1.40GHz-with-gentoo-2.2
KiB Mem:     2039492 total,    218116 free
KiB Swap:    2097148 total,   2078628 free
Timestamp of tree: Sun, 02 Feb 2014 08:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3, 3.2.5-r3, 3.3.3
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo robbins_local
CFLAGS="-O2 -pipe -march=native -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
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="-O2 -pipe -march=native -fomit-frame-pointer"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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"
USE="acl amd64 berkdb bzip2 cli consolekit cpudetection cracklib crypt cxx dri dts dvd faac gdbm gudev hardened hwdb iconv ipv6 justify matroska mmx mmxext modules mp3 mp4 multilib ncurses nls nptl openmp pam pax_kernel pcre pic policykit python readline session sse sse2 ssl ssse3 tcpd threads unicode urandom x264 xml xvid zlib" ABI_X86="64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 author" CAMERAS="ptp2" 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 ublox ubx" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="intel vesa fbdev" 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"

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-O2 -pipe -march=native -fomit-frame-pointer"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult before changing.

FEATURES="collision-protect parallel-fetch sandbox -metadata-transfer splitdebug"

USE="mmx mmxext sse sse2 ssse3 -X xml -cups unicode policykit consolekit\
        -opengl  -osdmenu -xscreensaver -xv pic  python -iptables\
        gudev hwdb -gnome\
        xvid mp3 x264 faac mp4 dts matroska dvd threads cpudetection"

VIDEO_CARDS="intel vesa fbdev"
INPUT_DEVICES="keyboard mouse evdev synaptics"




Back to top
View user's profile Send private message

Joined: 04 Oct 2007
Posts: 162
Location: Switzerland

PostPosted: Tue Feb 11, 2014 10:30 pm    Post subject: Reply with quote


It depends - it might - probably it does? ;)

I became aware of such a problem 2 weeks ago while upgrading an old PC (which has some AMD <something> black edition CPU).
Saw such an error message while compiling gcc 4.7, then ran other tests with some other big packages (e.g. glibc) and got from time to time segfaults - some of them made the compilation stop, others didn't.
Identified the problem (overheating) by lowering the max CPU clock in "/sys/devices/system/cpu/cpu[ALL]/cpufreq/scaling_max_freq" and recompiling without "almost" getting such weird messages (if I remember correctly glibc always outputted one, no matter what), which means that in my case the CPU was getting unreliable when going above ~60C (I always had problems with AMD CPUs & GPUs...).

Fastest way for you to check if you're affected by something similar is to recompile gcc after setting your CPU freq to powersave/min. freq. .
Back to top
View user's profile Send private message

Joined: 23 May 2008
Posts: 4774
Location: Dallas area

PostPosted: Tue Feb 11, 2014 11:03 pm    Post subject: Reply with quote

More than likely some type of hardware problem
Could be memory or the power supply being flaky, pushing the cpu/memory will take more juice.
PRIME x570-pro, 3700x, RX 550 & 560 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message

Joined: 06 Dec 2005
Posts: 444

PostPosted: Wed Feb 12, 2014 2:44 pm    Post subject: Reply with quote

I don't think it is. I recompiled with a lowered clock speed. Same errors. I compiled glibc with a high clock speed. No errors. I compiled gcc with the full speed clock. Same errors, at the same locations in both the compile process (afaict by clock time) and the executable.
Feb 11 18:01:55 [kernel] [3814989.405000] cc1plus[28793]: segfault at 32ea03a59b8 ip 00000000011226a1 sp 000003aef29fbf60 error 4 in cc1plus[400000+1198000]
Feb 11 18:03:52 [kernel] [3815106.078697] cc1plus[5268]: segfault at 34498d4c678 ip 00000000011226a1 sp 000003982efff760 error 4 in cc1plus[400000+1198000]
Feb 11 19:10:05 [kernel] [3819079.115525] cc1plus[20994]: segfault at 32b7a82ff6c ip 0000000000d8bf69 sp 000003df45dc97d0 error 4 in cc1plus[400000+d63000]
Feb 11 19:11:32 [kernel] [3819166.591543] cc1plus[29289]: segfault at 2ec168830b4 ip 0000000000d8bf69 sp 000003a2dfe22910 error 4 in cc1plus[400000+d63000]
Feb 11 19:45:12 [kernel] [3821186.076631] cc1plus[12693]: segfault at 2a0d81b6f64 ip 0000000000d8bf69 sp 000003d38eb82390 error 4 in cc1plus[400000+d63000]
Feb 11 19:46:40 [kernel] [3821274.615069] cc1plus[21032]: segfault at 3745ee13f2c ip 0000000000d8bf69 sp 0000039c7e3d4950 error 4 in cc1plus[400000+d63000]

then with full speed cpu:

Feb 12 06:34:47 [kernel] [3860161.418951] cc1plus[32732]: segfault at 3644271e150 ip 00000000011226a1 sp 000003b9f9768a60 error 4 in cc1plus[400000+1198000]
Feb 12 06:35:53 [kernel] [3860227.507267] cc1plus[9017]: segfault at 316114e9d00 ip 00000000011226a1 sp 00000395f02ba120 error 4 in cc1plus[400000+1198000]
Feb 12 07:13:51 [kernel] [3862505.864425] cc1plus[24686]: segfault at 2acde7d5844 ip 0000000000d8bf69 sp 000003eb51960dd0 error 4 in cc1plus[400000+d63000]
Feb 12 07:14:41 [kernel] [3862555.596701] cc1plus[639]: segfault at 301ab03bb9c ip 0000000000d8bf69 sp 000003ce1fc05cd0 error 4 in cc1plus[400000+d63000]
Feb 12 07:34:04 [kernel] [3863718.318532] cc1plus[16391]: segfault at 2ed30d1980c ip 0000000000d8bf69 sp 0000039979d24650 error 4 in cc1plus[400000+d63000]
Feb 12 07:34:53 [kernel] [3863767.220697] cc1plus[24582]: segfault at 344bbce88cc ip 0000000000d8bf69 sp 000003f896cd84d0 error 4 in cc1plus[400000+d63000]

Two pairs of segaults, at the same locations in the executable, with the same instruction pointers. Seems to reproducible to be a hardware failure.
Back to top
View user's profile Send private message

Joined: 27 Jun 2012
Posts: 3

PostPosted: Wed Feb 26, 2014 2:24 pm    Post subject: Reply with quote

In my case immediately after upgrading glibc to =sys-libs/glibc-2.17 I'd encountered massive segfaults in many applications even last stage of glibc upgrading failed.
So i have to downgrade glibc from =sys-libs/glibc-2.17 to =sys-libs/glibc-2.15-r3
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum