Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 322727 - random packages segfault at random times
Summary: random packages segfault at random times
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
Depends on:
Reported: 2010-06-04 08:58 UTC by Emmanuel Andry
Modified: 2010-06-22 15:50 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Emmanuel Andry 2010-06-04 08:58:37 UTC
Since you've disabled or enabled at least one algorithm, you need to do
the following before building:

        make depend

Configured for linux-elf.
make -j3 -j1 depend 
making depend in crypto...
make[1]: Entering directory `/var/tmp/portage/dev-libs/openssl-0.9.8o/work/openssl-0.9.8o/crypto'
making depend in crypto/objects...
make[2]: Entering directory `/var/tmp/portage/dev-libs/openssl-0.9.8o/work/openssl-0.9.8o/crypto/objects'
../../util/domd ../.. -MD i686-pc-linux-gnu-gcc -- -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -DL_ENDIAN -DTERMIO -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -O2 -march=pentium4 -mtune=pentium4 -pipe -fomit-frame-pointer -fno-strict-aliasing -Wa,--noexecstack -I.. -I../.. -I../../include -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CMS -DOPENSSL_NO_JPAKE -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED --  o_names.c obj_dat.c obj_lib.c obj_err.c
make[2]: Leaving directory `/var/tmp/portage/dev-libs/openssl-0.9.8o/work/openssl-0.9.8o/crypto/objects'
making depend in crypto/md2...
make[2]: Entering directory `/var/tmp/portage/dev-libs/openssl-0.9.8o/work/openssl-0.9.8o/crypto/md2'
make[2]: *** [depend] Segmentation fault
make[2]: Leaving directory `/var/tmp/portage/dev-libs/openssl-0.9.8o/work/openssl-0.9.8o/crypto/md2'
make[1]: *** [depend] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-libs/openssl-0.9.8o/work/openssl-0.9.8o/crypto'
make: *** [depend] Error 1
 * ERROR: dev-libs/openssl-0.9.8o failed:
 *   depend failed
 * Call stack:
 *, line  54:  Called src_compile
 *   environment, line 2602:  Called die
 * The specific snippet of code:
 *       emake -j1 depend || die "depend failed";
 * If you need support, post the output of 'emerge --info =dev-libs/openssl-0.9.8o',
 * the complete build log and the output of 'emerge -pqv =dev-libs/openssl-0.9.8o'.
 * The complete build log is located at '/var/tmp/portage/dev-libs/openssl-0.9.8o/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/openssl-0.9.8o/temp/environment'.
 * S: '/var/tmp/portage/dev-libs/openssl-0.9.8o/work/openssl-0.9.8o'

Reproducible: Always
Comment 1 Emmanuel Andry 2010-06-04 08:59:35 UTC
# emerge --info                        
Portage (hardened/linux/x86/10.0, gcc-4.3.4, glibc-2.11.1-r0, 2.6.32-hardened-r8 i686)
System uname: Linux-2.6.32-hardened-r8-i686-Intel-R-_Xeon-TM-_CPU_2.66GHz-with-gentoo-2.0.1
Timestamp of tree: Fri, 04 Jun 2010 08:30:01 +0000
app-shells/bash:     4.1_p7
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/cmake:      2.8.1-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.7b
virtual/os-headers:  2.6.33
CFLAGS="-O2 -march=pentium4 -mtune=pentium4 -pipe -fomit-frame-pointer"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=pentium4 -mtune=pentium4 -pipe -fomit-frame-pointer"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="acl acpi ads apache2 audit bash-completion bcmath berkdb bzip2 calendar caps cgi chdir cli colordiff contentcache cracklib crypt ctype cups curl cxx dri expat extensions filter ftp gd gdbm gmp gpm graphite hardened headless iconv idn imap innodb ipv6 ithreads json kerberos latin1 ldap lsb memlimit mhash mktemp mmx modules mudflap mysql ncurses network-cron nls nptl nptlonly openmp openssl pam pcre perl php pic posix pppd python readline reflection session snmp soap sockets spl sse sse2 ssl suhosin svg symlink sysfs tcpd threads unicode urandom vboxwebsrv x86 xml xorg xsl zip zlib" 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" 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" APACHE2_MPMS="prefork" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 intel        mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage   siliconmotion sis sisusb tdfx tga trident tseng v4l vesa via vmware voodoo" 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" 
Comment 2 SpanKY gentoo-dev 2010-06-04 18:22:29 UTC
so go into the build dir and run that command by hand and see if it segfaults
Comment 3 Emmanuel Andry 2010-06-07 11:04:00 UTC
It also segfaults when running make by hand.

Seems that it randomly crashes, never at the same point.

But I also have weird build issues with other packages too. It seems that it occurs since I use hardened-source 2.6.32
I'll check for more hardened related issues in my logs.
Comment 4 SpanKY gentoo-dev 2010-06-07 11:52:28 UTC
not a problem with openssl
Comment 5 Emmanuel Andry 2010-06-08 14:07:29 UTC
Seems to be grsec related (from kern.log):

Jun  8 15:58:13 gentoo kernel: [ 5218.966511] gcc[11405]: segfault at 852298a0 ip 252298a0 sp 5c095a50 error 5 in[25229000+1c000]
Jun  8 15:58:13 gentoo kernel: [ 5218.966685] grsec: From Segmentation fault occurred at 852298a0 in /usr/i686-pc-linux-gnu/gcc-bin/4.3.4/i686-pc-linux-gnu-gcc[gcc:11405] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:11404] uid/euid:0/0 gid/egid:0/0
Jun  8 15:58:13 gentoo kernel: [ 5218.966934] grsec: From denied resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 for /usr/i686-pc-linux-gnu/gcc-bin/4.3.4/i686-pc-linux-gnu-gcc[gcc:11405] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:11404] uid/euid:0/0 gid/egid:0/0
Comment 6 Michael Weber (RETIRED) gentoo-dev 2010-06-09 04:09:49 UTC
Ok, can you please run a full memory check (sys-apps/memtest86+, boot into it) and a disk check (from sys-fs/e2fsprogs, something like `badblocks -n -s -v /dev/....`) and a filesystem check (e2fsck ...). 

If all that works, try to recompile the compiler.

But maybe your machine is just broken. I've had this on server systems after 5-6 year of permanent operation.
Comment 7 Emmanuel Andry 2010-06-22 15:50:19 UTC
I've upgraded to hardened-source 2.6.32 r9, and this doesn't happen anymore.