Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 401455 - Random segfaults in binutils (ld, as, libbfd) on Intel Atom D525.
Summary: Random segfaults in binutils (ld, as, libbfd) on Intel Atom D525.
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal major
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-30 08:57 UTC by Justin W
Modified: 2012-02-01 19:12 UTC (History)
2 users (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 W 2012-01-30 08:57:03 UTC
My dmesg is full of segfaults in as/ld, and compiling many packages has become an exercise in futility.  Originally on binutils 2.21-r1 and then tried unmasking and using 2.22, but both give the same issue.

At first I thought what you're probably thinking right now: bad hardware.  It's a brand new system, so I don't believe overheating is a concern (and there is nothing in mcelog), and reboots soon after a failure have the bios saying the CPU is ~50c (lm-sensors gives what I believe are bogus readings (~25c)).  I have run memtest and the system has passed.  And the funny thing is, some things I can compile over and over and over and over and will never receive any segfaults (like the linux kernel).  Other packages, will fail 99% of the time.  This tells me it's not a hardware problem.  Of course, I'm happy to be wrong.

Reproducible: Sometimes

Steps to Reproduce:
1. emerge eix
Actual Results:  
Emerge fails with 'internal error'

Expected Results:  
eix goodness.

emerge --info:

Portage 2.1.10.41 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.13-r4, 3.2.1-gentoo-r2 x86_64)
=================================================================
System uname: Linux-3.2.1-gentoo-r2-x86_64-Intel-R-_Atom-TM-_CPU_D525_@_1.80GHz-with-gentoo-2.0.3
Timestamp of tree: Mon, 30 Jan 2012 03:45:01 +0000
app-shells/bash:          4.1_p9
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.2
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
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.13-r4
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=native"
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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=native"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://gentoo.arcticnetwork.ca/pub/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync4.ca.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 ao audiofile bash-completion berkdb branding bzip2 cdda cddb cdparanoia cgi cli cracklib crypt css cups curl cxx dga dri dvd encode exif ffmpeg firefox flac fontconfig foomaticdb fortran ftp gdbm geoip gif gimp gnutls gstreamer gtk hddtemp iconv imagemagick imap imlib innodb ipod ipv6 javascript jpeg lame libmpeg2 libwww mad mime mmap mmx mmxext modules mp3 mp4 mpeg mpg123 mplayer mudflap multilib musicbrainz ncurses nptl nptlonly offensive ogg opengl openmp pam pcre perl pixbuf png posix pppd qt4 raw rdesktop readline scanner session slang smp sockets sound sox sqlite3 sse sse2 ssl ssse3 sysfs syslog system-sqlite taglib tcpd threads tiff timidity truetype unicode usb vim-syntax vorbis wifi x264 xcomposite xft xinerama xorg xosd xpm xscreensaver xv xvid 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 stage tables krita karbon braindump" 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 ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" SANE_BACKENDS="snapscan" USERLAND="GNU" VIDEO_CARDS="intel" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

========================

dmesg seg faults:

[ 5633.218813] as[4085]: segfault at d000000018 ip 0000000000410cf0 sp 00007fff9785bf00 error 4 in as[400000+51000]
[ 9434.296690] ld[17652]: segfault at 88015e3228 ip 00007fa456090074 sp 00007fffbcbc95e0 error 4 in libbfd-2.21.1.so[7fa45601d000+e1000]
[ 9440.955021] as[19684]: segfault at 1500000018 ip 00000000004101b0 sp 00007fff047236f0 error 4 in as[400000+4e000]
[ 9442.535456] ld[20238]: segfault at 2d00000018 ip 00007fa5b0b85074 sp 00007fff035519e0 error 4 in libbfd-2.21.1.so[7fa5b0b12000+e1000]
[10047.121369] as[4924]: segfault at 700000018 ip 00000000004101b0 sp 00007fff28eff3f0 error 4 in as[400000+4e000]
[10080.795847] as[13908]: segfault at 100000018 ip 00000000004101b0 sp 00007fffa1a76440 error 4 in as[400000+4e000]
[10989.425817] as[6019]: segfault at 6d00000018 ip 00000000004101b0 sp 00007fff54448f10 error 4 in as[400000+4e000]
[10989.957368] as[6168]: segfault at 6f00000018 ip 00000000004101b0 sp 00007fff4e5e0500 error 4 in as[400000+4e000]
[11019.450262] ld[13573]: segfault at 100000018 ip 00007f67bfb47074 sp 00007fff53dc9bf0 error 4 in libbfd-2.21.1.so[7f67bfad4000+e1000]
[11092.730419] as[24068]: segfault at e600000018 ip 00000000004101b0 sp 00007fff9886a860 error 4 in as[400000+4e000]
[11675.642716] as[20526]: segfault at 700000018 ip 0000000000410360 sp 00007fff249a7480 error 4 in as[400000+4f000]
[11871.641852] as[551]: segfault at 7300000018 ip 0000000000410360 sp 00007fffc52bed60 error 4 in as[400000+4f000]

================================================

# emerge -pqv =sys-devel/binutils-2.21.1-r1
[ebuild   R   ] sys-devel/binutils-2.21.1-r1  USE="zlib -multislot -multitarget -nls* -static-libs -test -vanilla" 

================================================
I'm happy to include the build log, but it's massive, and I'm not sure you'd get anything from it.  Just a random *** error in the middle of the make, and then portage behaving as you'd expect once that happens.

And I don't think my build environment has any bearing on the binaries in binutils at all since this is a brand new install, and the current binutils in place came out of the stage3 binary, not a compilation of my own.
Comment 1 Mike Gilbert gentoo-dev 2012-01-30 17:59:50 UTC
Your success with the Linux kernel might be telling. Can you try building some stuff without -march=native?
Comment 2 Justin W 2012-01-31 01:03:57 UTC
Sorry for the delay; was running more tests.

I left the computer doing a memtest overnight.  It passed with no errors.

I recompiled binutils without -march=native, no change.  Lots of segfaults in as.

I tried doing a quickpkg on my laptop (amd64, i3), and copying the package over and installing it on the atom.  I brought over both glibc and binutils.  The system behaves the same.

And just to appease myself, I recompiled the kernel another dozen times.  No issues.
Comment 3 Mike Gilbert gentoo-dev 2012-01-31 01:17:07 UTC
I meant build *other* packages without -march=native. My hypothesis is that -march=native is triggering the segfaults.
Comment 4 Justin W 2012-01-31 01:18:33 UTC
Turns out I'm a horrible, filthy liar.  I was out of ideas, so the system was doing a:

while true ; do make clean; make bzImage ; done

It just crashed on perhaps the 20th build.  While it seems to happen less on a kernel build, it appears it does happen on a kernel build.

I'm starting to suspect a bad CPU.  I'm going to do an RMA on this one and get another to see if the issue comes back.

Feel free to mark the bug invalid in the meantime.
Comment 5 Mike Gilbert gentoo-dev 2012-01-31 01:21:04 UTC
Alright. As always, feel free to reopen if/when you isolate the problem a bit.
Comment 6 Christian Ruppert (idl0r) gentoo-dev 2012-02-01 19:12:57 UTC
I'd suggest to check the RAM first.
We have some atom's and all of them had problems with a lot of RAM sticks.
Make sure you use ones that are tested by the vendor.
So to clarify: The RAM may be ok, it's the atom/BIOS itself.

Also try a BIOS upgrade.