| Summary: | ERROR: sys-devel/gcc-3.3.2-r5 failed. - xgcc: Internal error: Segmentation fault (program cc1) | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | david.pesticcio |
| Component: | [OLD] GCC Porting | Assignee: | Please assign to toolchain <gcc-porting> |
| Status: | RESOLVED INVALID | ||
| Severity: | blocker | CC: | flash3001, pappy, pau |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
gcc compile error and emerge info
more gcc errors error logs kernel panic when compiling gcc |
||
Well, there is either 1 or two issues: 1) Your kernel is just buggy, oops and then cause this problem. 2) You might run out of memory which causes this issue. I do not think so though, as it usually is more stage2 (especially libstdc++ and java causing a OOM). 3) You might be running out of disk space, which will also cause this issue. Note however that 2) and 3) should not cause the oops. So I think in general that the issue is 1). Please try another kernel version (or less patched one). You might also try to change PORTAGE_TMPDIR to another partition with more disk space. What kernel are you running btw? objc-parse.y: conflicts: 32 shift/reduce, 1 reduce/reduce make[2]: *** [/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/objc/objc-parse.c] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/var/tmp/portage/gcc-3.3.2-r5/work/build/gcc' make[1]: *** [stage2_build] Error 2 make[1]: Leaving directory `/var/tmp/portage/gcc-3.3.2-r5/work/build/gcc' make: *** [bootstrap-lean] Error 2 !!! ERROR: sys-devel/gcc-3.3.2-r5 failed. !!! Function src_compile, Line 432, Exitcode 2 !!! (no error message) # emerge info Portage 2.0.50 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.6.1-rc1) ================================================================= System uname: 2.6.1-rc1 i686 Pentium III (Katmai) Gentoo Base System version 1.4.3.10 Autoconf: sys-devel/autoconf-2.58 Automake: sys-devel/automake-1.7.7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -mcpu=i686 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/s hare/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -mcpu=i686 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs buildpkg ccache cvs distcc sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linu x/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="apm arts avi berkdb crypt cups distcc encode esd foomaticdb gdbm gif gpm gt k gtk2 imlib jpeg kde libg++ libwww mad mikmod motif mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell ssl svga tcpd truetype x86 xml2 xmms xv zlib" Can you give a log with the actual error in please. The same for me: stage1/xgcc -Bstage1/ -B/usr/i686-pc-linux-gnu/bin/ -c -march=athlon-xp -O2 -pipe -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -DHAVE_CONFIG_H -I. -If -I/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc -I/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/f -I/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/config -I/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/../include /var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/f/com.c -o f/com.o In file included from /var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/f/com.c:16573: gt-f-com.h: In function `gt_ggc_mx_lang_tree_node': gt-f-com.h:250: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. The bug is not reproduceable, so it is likely a hardware or OS problem make[2]: *** [f/com.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/gcc-3.3.2-r5/work/build/gcc' make[1]: *** [stage2_build] Error 2 make[1]: Leaving directory `/var/tmp/portage/gcc-3.3.2-r5/work/build/gcc' make: *** [bootstrap-lean] Error 2 !!! ERROR: sys-devel/gcc-3.3.2-r5 failed. !!! Function src_compile, Line 435, Exitcode 2 !!! (no error message) -------------------------------------------------------------------------- Gentoo gs-sources kernel(2.4.23_pre8-gss-r2), with custom options gcc 3.2.3-r3, glibc 2.3.2-r9 Athlon XP, with 512Mb ram grsecurity/selinux/hardened in use? I am having similar problems here trying to upgrade to gcc-3.3.2-r5 form gcc-3.2.3-r3 in a gentoo system with vanilla 2.4.24 kernel (I've also tried with 2.4.22-ac4 with same results). My system is an Athlon XP 2000+ with 256Mb RAM. Find attached log of 3 different failed compilation attempts. Created attachment 25891 [details]
gcc compile error and emerge info
Are you using distcc maybe? Also, how much memory/swap? I'm not using distcc.
I have 256 Mb of RAM and 1GB of swap:
s0 root # free
total used free shared buffers cached
Mem: 256720 253012 3708 0 70292 72072
-/+ buffers/cache: 110648 146072
Swap: 979924 30056 949868
s0 root #
Could you try with -march=athlon ? Still having the same issue with -march=athlon. It crashes every time I try to compile it. Look in the attached file if you want to see some errors I get. Tell me if you need me to do something else. Created attachment 25954 [details]
more gcc errors
Running out of memory CAN cause a gcc crash, as Martin suspected. I experienced several strange gcc internal errors on different builds until I realized my swap partition was not working. After fixing swap I emerged both gcc and glibc without a problem. Apparently this is not the issue for Pau Oliva since it seems his swap is active (and huge), but hopefully it is a useful clue. the problem persists...
total used free shared buffers cached
Mem: 255976 224004 31972 0 31388 109868
-/+ buffers/cache: 82748 173228
Swap: 915696 36156 879540
and I don't use anything like grsec
Different kernel maybe (don't know if rest also get oops) ... ? I just get segfaults, no kernel ooops. I still haven't been able to compile new gcc. Created attachment 26334 [details]
error logs
3 tries to compile gcc-3.3.2-r5
I've tried to compile gcc again, with a new kernel (gs-sources:2.4.25_pre7-gss-r2), but it still fails with random error messages (see the attachment above). Yesterday my machine hung with an oops after one week uptime. I recompiled vanilla kernel 2.4.25 and tried to compile gcc again with this new kernel. Now I get a segfault and a kernel panic every time I try to compile gcc. Could it be a hardware problem? I looked the CPU and system temperature and it was 59 Yesterday my machine hung with an oops after one week uptime. I recompiled vanilla kernel 2.4.25 and tried to compile gcc again with this new kernel. Now I get a segfault and a kernel panic every time I try to compile gcc. Could it be a hardware problem? I looked the CPU and system temperature and it was 59º CPU and 42º motherboard when it did the panic, after about 10 minutes compiling gcc, fans are running at normal speed ~4500rpm. Any ideas? Created attachment 26385 [details]
kernel panic when compiling gcc
I'm getting this when trying to bootstrap on a fresh install, going to try a newer stage 1 and see what happens. I was using livecd 1.4. r5/work/gcc-3.3.2/gcc/. -I/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/config -I/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/../include /var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/genpreds.c -o genpreds.o cd /var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc && \ if bison -o c-p$$.c c-parse.y; then \ test -f c-p$$.output && mv -f c-p$$.output c-parse.output ; \ mv -f c-p$$.c c-parse.c ; \ else \ rm -f c-p$$.* ; \ false ; \ fi make[2]: *** [/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/c-parse.c] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/var/tmp/portage/gcc-3.3.2-r5/work/build/gcc' make[1]: *** [stage1_build] Error 2 make[1]: Leaving directory `/var/tmp/portage/gcc-3.3.2-r5/work/build/gcc' make: *** [bootstrap-lean] Error 2 !!! ERROR: sys-devel/gcc-3.3.2-r5 failed. !!! Function src_compile, Line 435, Exitcode 2 !!! (no error message) cdimage portage # emerge --info Portage 2.0.50-r1 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1,2.3.2-r9, 2.4.21-gss) ================================================================= System uname: 2.4.21-gss i686 Pentium III (Katmai) Gentoo Base System version 1.4.3.8p1 Autoconf: Automake: ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs buildpkg ccache sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X apm arts avi berkdb crypt cups encode foomaticdb gdbm gif gpm gtk gtk2 imlib jpeg kde libg++ libwww mad mikmod motif mpeg ncurses nls oggvorbis opengl oss pam pdflib png python qt quicktime readline sdl slang spell ssl svga tcpd truetype x86 xml2 xmms xv zlib" what is the current status of this bug, please? stage1/xgcc -Bstage1/ -B/usr/i686-pc-linux-gnu/bin/ -c -march=athlon-xp -O2 -pipe -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc -I/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/. -I/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/config -I/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/../include /var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/c-common.c -o c-common.o /var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/c-common.c: In function `c_common_nodes_and_builtins': /var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/c-common.c:3598: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. The bug is not reproduceable, so it is likely a hardware or OS problem make[2]: *** [c-common.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/gcc-3.3.2-r5/work/build/gcc' make[1]: *** [stage2_build] Error 2 make[1]: Leaving directory `/var/tmp/portage/gcc-3.3.2-r5/work/build/gcc' make: *** [bootstrap-lean] Error 2 !!! ERROR: sys-devel/gcc-3.3.2-r5 failed. !!! Function src_compile, Line 435, Exitcode 2 !!! (no error message) see my details in the above messages i don't think it's a hardware issue, because the machine producing this error is a server, running 24/7 and which successfully compiled 200 other packages any news on this? I still can't compile gcc glibc/binutils in use? Mine was a hardware problem, everithing compiled fine after I replaced the RAM. heh, nice |
While running "emerge -k gcc" it borks at some point, not sure if its random, (see note below) with a terminal error. I am looking into the possibility of it being a h/w issue with RAM overheating, or running to fast. I will report back if it fails at random points or not. I cannot recall at present. Please let me know how I should recall this bug if I find that its the h/w and not the s/w. Cheers. kr8 Reproducible: Always Steps to Reproduce: 1. Fresh system boot 2. Run emerge -k gcc 3. Wait a while, and boom! Not sure if its the same stage just yet. I takes a while to get to this point. I will report back when if I can establish an identical failure point. Actual Results: stage1/xgcc -Bstage1/ -B/usr/i686-pc-linux-gnu/bin/ -c -march=pentium4 -mcpu=pentium4 -pipe -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc -I/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/. -I/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/config -I/var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/../include /var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/gcc/dwarf2out.c -o dwarf2out.o {standard input}: Assembler messages: {standard input}:16225: Warning: end of file not at end of a line; newline inserted {standard input}:17384: Error: bad register name `%e' xgcc: Internal error: Segmentation fault (program cc1) Please submit a full bug report. See <URL:http://bugs.gentoo.org/> for instructions. make[2]: *** [dwarf2out.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/gcc-3.3.2-r5/work/build/gcc' make[1]: *** [stage2_build] Error 2 make[1]: Leaving directory `/var/tmp/portage/gcc-3.3.2-r5/work/build/gcc' make: *** [bootstrap-lean] Error 2 !!! ERROR: sys-devel/gcc-3.3.2-r5 failed. !!! Function src_compile, Line 432, Exitcode 2 !!! (no error message) - from syslog-ng messages file Feb 8 16:49:34 gentoo kernel BUG at page_alloc.c:235! Feb 8 16:49:34 gentoo invalid operand: 0000 Feb 8 16:49:34 gentoo CPU: 0 Feb 8 16:49:34 gentoo EIP: 0010:[<80137f43>] Not tainted Feb 8 16:49:34 gentoo EFLAGS: 00010202 Feb 8 16:49:34 gentoo eax: 00000040 ebx: 802e2758 ecx: 81533ab0 edx: 81533ab0 Feb 8 16:49:34 gentoo esi: 802e2790 edi: 00000000 ebp: 9bd37e78 esp: 9bd37e44 Feb 8 16:49:34 gentoo ds: 0018 es: 0018 ss: 0018 Feb 8 16:49:34 gentoo Process cc1 (pid: 12111, stackpage=9bd37000) Feb 8 16:49:34 gentoo Stack: 00001000 00000000 9bd36000 0001abe3 81533ab0 0001abe2 81533a80 00000286 Feb 8 16:49:34 gentoo 00000000 802e2758 802e2758 802e292c 00000001 9bd37ec0 801381c6 815c4b08 Feb 8 16:49:34 gentoo 0000005d 815c4b08 8850e280 8850e334 9993f880 2ac8a000 9bd36000 802e2758 Feb 8 16:49:34 gentoo Call Trace: [<801381c6>] [<8012c4e1>] [<8012c8e0>] [<80118125>] [<8012d84b>] Feb 8 16:49:34 gentoo [<8010ee01>] [<80117fdb>] [<801092d8>] Feb 8 16:49:34 gentoo Feb 8 16:49:34 gentoo Code: 0f 0b eb 00 dd 41 2a 80 8b 5d dc 8b 43 18 a9 80 00 00 00 74 Feb 8 16:49:34 gentoo kernel BUG at page_alloc.c:103! Feb 8 16:49:34 gentoo invalid operand: 0000 Feb 8 16:49:34 gentoo CPU: 0 Feb 8 16:49:34 gentoo EIP: 0010:[<80137a81>] Not tainted Feb 8 16:49:34 gentoo EFLAGS: 00010286 Feb 8 16:49:34 gentoo eax: 00000000 ebx: 81533ab0 ecx: 802e2830 edx: 802e2680 Feb 8 16:49:34 gentoo esi: 9bbf7b00 edi: 00000000 ebp: 9bd37c80 esp: 9bd37c50 Feb 8 16:49:34 gentoo ds: 0018 es: 0018 ss: 0018 Feb 8 16:49:34 gentoo Process cc1 (pid: 12111, stackpage=9bd37000) Feb 8 16:49:34 gentoo Stack: 802e2808 00000000 9bd37c68 802e2758 81030020 802e2790 00000203 ffffffff Feb 8 16:49:34 gentoo 00003897 00102000 87912f44 00125000 9bd37ca8 8012ce6f 81533ab0 802ea260 Feb 8 16:49:34 gentoo 8035cf3e 00000001 00000052 2ac00000 8352c2ac 2abf4000 9bd37ce4 8012b447 Feb 8 16:49:34 gentoo Call Trace: [<8012ce6f>] [<8012b447>] [<8012e417>] [<8011a836>] [<8011fa3b>] Feb 8 16:49:34 gentoo [<80109984>] [<80109984>] [<80109850>] [<801099e1>] [<80137f43>] [<801216bb>] Feb 8 16:49:34 gentoo [<801215a2>] [<80125479>] [<801092d8>] [<80137f43>] [<801381c6>] [<8012c4e1>] Feb 8 16:49:34 gentoo [<8012c8e0>] [<80118125>] [<8012d84b>] [<8010ee01>] [<80117fdb>] [<801092d8>] Feb 8 16:49:34 gentoo Feb 8 16:49:34 gentoo Code: 0f 0b 67 00 dd 41 2a 80 8b 4b 08 85 c9 74 08 0f 0b 69 00 dd Feb 8 16:49:34 gentoo <6>note: cc1[12111] exited with preempt_count 1 Expected Results: Erm, it should have completed the build of gcc v3.3.2-r5 I guess :) !!! My system does NOT use a stock options 2.4.25_pre6-gss KERNEL !!! gentoo root # emerge info Portage 2.0.50 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.4.25_pre6-gss) ================================================================= System uname: 2.4.25_pre6-gss i686 Intel(R) Celeron(R) CPU 1.70GHz Gentoo Base System version 1.4.3.10 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.58 Automake: sys-devel/automake-1.7.7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium4 -mcpu=pentium4 -funroll-loops -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -march=pentium4 -mcpu=pentium4 -funroll-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X apm arts avi berkdb crypt cups encode foomaticdb gdbm gif gnome gpm gtk gtk2 imlib jpeg kde libg++ libwww mad mikmod motif mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell ssl svga tcpd truetype x86 xml2 xmms xv zlib"