Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 264366 - sys-devel/binutils-2.18-r3: a lot of ld segfaults and general protection errors since a few days compiling and running menuconfig in kernel sources dir
Summary: sys-devel/binutils-2.18-r3: a lot of ld segfaults and general protection erro...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-31 09:53 UTC by Pacho Ramos
Modified: 2009-04-15 11:27 UTC (History)
0 users

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


Attachments
core.gz (core.gz,367.07 KB, application/octet-stream)
2009-03-31 09:56 UTC, Pacho Ramos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2009-03-31 09:53:03 UTC
Hello

Since a few days (seems that since 24 Mar) I am getting a lot of ld segfaults and general protection errors on one of my systems:
Mar 31 08:16:16 belkin2 ld[12924]: segfault at 9 ip 00002af662155030 sp
00007fff4899b200 error 4 in libbfd-2.18.so[2af66210c000+c2000]
Mar 31 08:17:30 belkin2 ld[13785]: segfault at 15 ip 00002b0c4f409030 sp
00007fff5b6e8f50 error 4 in libbfd-2.18.so[2b0c4f3c0000+c2000]
Mar 31 08:17:39 belkin2 ld[14504]: segfault at 107 ip 00002ba111b63030 sp
00007fff98f8d800 error 4 in libbfd-2.18.so[2ba111b1a000+c2000]
Mar 31 08:17:42 belkin2 ld[14736] general protection ip:2b3acb859b22
sp:7fffdf287d68 error:0 in libbfd-2.18.so[2b3acb821000+c2000]
Mar 31 08:17:46 belkin2 ld[14952]: segfault at 107 ip 00002ab9ea7e4030 sp
00007fffc030b8f0 error 4 in libbfd-2.18.so[2ab9ea79b000+c2000]
Mar 31 08:17:47 belkin2 ld[15019]: segfault at c5 ip 00002b685dbe8030 sp
00007fff4cf08770 error 4 in libbfd-2.18.so[2b685db9f000+c2000]
Mar 31 08:41:19 belkin2 system 00:00: iomem range 0x7fef0000-0x7fefffff
could not be reserved
Mar 31 08:41:19 belkin2 abituguru:   bank2 sensor 5 does not seem to be a
fan sensor: the threshold (0) is below the minimum (5)
Mar 31 08:41:19 belkin2 Warning! ehci_hcd should always be loaded before
uhci_hcd and ohci_hcd, not after
Mar 31 10:53:59 belkin2 system 00:00: iomem range 0x7fef0000-0x7fefffff
could not be reserved
Mar 31 10:53:59 belkin2 abituguru:   bank2 sensor 5 does not seem to be a
fan sensor: the threshold (0) is below the minimum (5)
Mar 31 10:54:55 belkin2 ld[5044]: segfault at 107 ip 00002ba652b25030 sp
00007fff57fcd860 error 4 in libbfd-2.18.so[2ba652adc000+c2000]
Mar 31 10:54:56 belkin2 ld[5060]: segfault at 107 ip 00002aacc5d16030 sp
00007fffe4dda670 error 4 in libbfd-2.18.so[2aacc5ccd000+c2000]
Mar 31 11:27:50 belkin2 system 00:00: iomem range 0x7fef0000-0x7fefffff
could not be reserved
Mar 31 11:27:50 belkin2 abituguru:   bank2 sensor 5 does not seem to be a
fan sensor: the threshold (0) is below the minimum (5)
Mar 31 11:28:40 belkin2 ld[4794]: segfault at f959010 ip 00002b01be86eb6b sp
00007fffec2a0300 error 4 in libbfd-2.18.so[2b01be808000+c2000]
Mar 31 11:28:40 belkin2 ld[4802]: segfault at 95 ip 00002b7c84aba030 sp
00007fff260358d0 error 4 in libbfd-2.18.so[2b7c84a71000+c2000]
Mar 31 11:37:31 belkin2 ld[15616]: segfault at 107 ip 00002ba3b9082030 sp
00007ffff1a701e0 error 4 in libbfd-2.18.so[2ba3b9039000+c2000]
Mar 31 11:39:49 belkin2 ld[17375]: segfault at 107 ip 00002b1c4d8fe030 sp
00007fff5d1f3970 error 4 in libbfd-2.18.so[2b1c4d8b5000+c2000]
Mar 31 11:39:50 belkin2 ld[17406] general protection ip:2b4d26595b6b

I already know that this is usually a hardware related problem. But I have seen that I can reproduce the segfault very frequently when running "make menuconfig" on my kernel sources dir (yes, I have already tried to clean up completely sources dir but I get segfaults again just after running "make all" on it)

As I thought it could be a hardware problem, I tried to install Mandriva 2009.0 on a different partition for trying to follow the same steps, but ld never segfaults under mandriva, even running "make menuconfig" on exactly the same sources dir copied from gentoo partition.

Then, I have re-emerged binutils with -march=k8 -O2 -ggdb and added "split-debug" to the features for trying to get a proper backtrace from a generated core file.

If I have missed something, please point me it for solving it. I am a bit worried because these ld segfaults cause a lot of merges to fail

This emerge --info is from yesterday (you will see that still have old CFLAGS I use for all the system), but I have only modified CFLAGS and FEATURES for trying to get a proper backtrace as explained above

Thanks a lot for your help


Reproducible: Always
Comment 1 Pacho Ramos gentoo-dev 2009-03-31 09:53:18 UTC
Portage 2.1.6.11 (default/linux/amd64/2008.0/desktop, gcc-4.1.2,
glibc-2.8_p20080602-r1, 2.6.28-gentoo-r4 x86_64)
=================================================================
System uname:
Linux-2.6.28-gentoo-r4-x86_64-AMD_Athlon-tm-_64_Processor_3200+-with-glibc2.2.5
Timestamp of tree: Mon, 30 Mar 2009 10:30:01 +0000
distcc 3.0 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/
/etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo
/etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d
/etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe -msse3"
DISTDIR="/usr/distfiles"
FEATURES="autoaddcvs ccache collision-protect cvs distlocks fixpackages
multilib-strict parallel-fetch protect-owned sandbox sfperms strict
unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org"
LANG="es_ES.UTF-8"
LC_ALL="es_ES.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="es es_ES en_US"
MAKEOPTS="-j2"
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="/usr/portage/local/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 amr asf audiofile avahi
banshee bash-completion beagle berkdb bzip2 bzlib cairo caps cdb cdda cddb
cdinstall cdparanoia cdr cleartype cli consolekit cpdflib cracklib cross crypt
css cups curl daap dbus dga dirac divx4linux djvu dlloader dri dts dv dvb dvd
dvdr dvdread dvi eds emboss encode epiphany erandom escreen evo evolution exif
fam fame fbcon ffmpeg flac foomaticdb fortran ftp fuse galago gb gcj gd ggi gif
gimp gimpprint git glib glitz glut glx gnome gnome-keyring gnome-print gphoto2
gpm gsm gstreamer gtk gtk2 hal iconv idn imagemagick imlib inotify isdnlog
ithreads jabber java java6 jfs jpeg jpeg2k kdeenablefinal kdehiddenvisibility
kpathsea lame latex lcms libnotify lm_sensors logrotate lzma mad madwifi midi
mikmod mime mjpeg mmx mmxext mng mono moonlight motif mp3 mpeg mplayer mudflap
multilib musepack musicbrainz nas nautilus ncurses nethack network
networkmanager nls nocardbus nptl nptlonly ntp nvidia ogg oggvorbis openal
opengl openmp pam pango pch pcre pdf perl plotutils png posix postscript ppds
pppd python qt3 qt3support qt4 quicktime readline reflection remote rtc scanner
schroedinger scrobbler sdl session slang slp sockets speex spell spl sse sse2
sse3 ssl ssse3 startup-notification subversion svg sysfs sysvipc t1lib tcpd
theora threads thunderbird tiff timidity totem trayicon truetype unicode usb
v4l2 vcd videos vim vorbis webkit wma wmf x264 xattr xcb xcomposite xfs xft
xine xml xml2 xmp xorg xpm xulrunner xv xvid xvmc zlib" ALSA_CARDS="via82xx"
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
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" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses
text" LINGUAS="es es_ES en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa fbdev
vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK,
PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Pacho Ramos gentoo-dev 2009-03-31 09:53:48 UTC
backtrace.log:
#0  0x00002b4d26595b6b in _bfd_elf_fix_symbol_flags (h=0xa49f20, 
    eif=0x7fff84577d00)
    at /var/tmp/portage/sys-devel/binutils-2.18-r3/work/binutils-2.18/bfd/elflink.c:2420
#1  0x00002b4d26595d80 in _bfd_elf_link_assign_sym_version (h=0xa49f20, 
    data=<value optimized out>)
    at /var/tmp/portage/sys-devel/binutils-2.18-r3/work/binutils-2.18/bfd/elflink.c:1854
#2  0x00002b4d265671b8 in bfd_hash_traverse (table=0x9043b0, 
    func=0x2b4d26595d30 <_bfd_elf_link_assign_sym_version>, 
    info=0x7fff84577ea0)
    at /var/tmp/portage/sys-devel/binutils-2.18-r3/work/binutils-2.18/bfd/hash.c:583
#3  0x00002b4d2659544b in bfd_elf_size_dynamic_sections (output_bfd=0x902010, 
    soname=0x0, rpath=0x0, filter_shlib=0x0, auxiliary_filters=0x0, 
    info=0x671c00, sinterpptr=0x7fff84577f70, verdefs=<value optimized out>)
    at /var/tmp/portage/sys-devel/binutils-2.18-r3/work/binutils-2.18/bfd/elflink.c:5589
#4  0x000000000042009d in ?? ()
#5  0x0000000000413a73 in ?? ()
#6  0x000000000041760c in ?? ()
#7  0x0000003eb881e4a4 in __libc_start_main () from /lib/libc.so.6
#8  0x00000000004046b9 in ?? ()
#9  0x00007fff84578158 in ?? ()
#10 0x0000000000000000 in ?? ()
Comment 3 Pacho Ramos gentoo-dev 2009-03-31 09:56:08 UTC
Created attachment 186860 [details]
core.gz

Core file (compressed with gzip as it was too large for attaching here)
Comment 4 SpanKY gentoo-dev 2009-03-31 22:56:54 UTC
you'll have to start by finding a command you can run that'll always crash.  running `make menuconfig` is not such a command.  that rule implies compiling other files ... you'll have to find those commands that are being run and crashing.
Comment 5 Pacho Ramos gentoo-dev 2009-04-01 07:21:56 UTC
With "ps axu | grep ld" seems that it's running the following:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o /dev/null /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/crtbegin.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../.. /tmp/ccqq6bJW.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/crtend.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64/crtn.o

But I cannot run it manually because /tmp/ccqq6bJW.o seems to be erased after "make menuconfig" ends :-/
Comment 6 Pacho Ramos gentoo-dev 2009-04-01 08:31:54 UTC
The same occur with "make oldconfig". Also, simply trying to compile eix sometimes will fail sooner or later due the same crash, but it takes a bit more tries to reproduce 
Comment 7 SpanKY gentoo-dev 2009-04-05 23:44:11 UTC
`make V=1 ...` will show you all commands the kernel runs
Comment 8 Pacho Ramos gentoo-dev 2009-04-07 09:46:36 UTC
(In reply to comment #7)
> `make V=1 ...` will show you all commands the kernel runs
> 

Finally I reinstalled system and problem disappeared :-), sadly, I didn't finally know what was messed up :-(

But thanks a lot for the information :-)
Comment 9 Pacho Ramos gentoo-dev 2009-04-13 17:10:33 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > `make V=1 ...` will show you all commands the kernel runs
> > 
> 
> Finally I reinstalled system and problem disappeared :-), sadly, I didn't
> finally know what was messed up :-(
> 
> But thanks a lot for the information :-)
> 

The problem reappeared but I think that I have seen what is causing it: ondemand cpufreq governor

The same with conservative

Seems that, if I stick with "permormance" governor, segfaults disappear. The problem is that I don't know if something has broke recently or there is a bug in powernow_k8 or ondemand modules, since I were using ondemand since 2005 without any problems :-/
Comment 10 SpanKY gentoo-dev 2009-04-13 21:37:04 UTC
might want to file a bug at http://bugzilla.kernel.org/ ... they should be able to help you diagnosis the problem

it would help them a lot if you could find a kernel release version that worked and one that did not
Comment 11 Pacho Ramos gentoo-dev 2009-04-15 11:27:33 UTC
OK, I will follow your suggestion

Thanks a lot for your attention