infinite loop while bootstrapping trunk on ubuntu 9.04 amd64

Matt matt@use.net
Mon Jun 22 03:01:00 GMT 2009


Hi,

Using the public svn mirror of trunk at r148757, I am getting a hang while 
doing a profiled bootstrap on Ubuntu 9.04 (Jaunty) on amd64 (dual core) 
using the default system compiler (4.3.3-5ubuntu4).

My configure options and make command are below, but here is the hung 
process commandline (output from ps auxww):
matt     26823  0.0  0.0   4492   356 pts/2    S+   01:27   0:00 
/home/matt/src/gcc-trunk-obj/./prev-gcc/xgcc 
-B/home/matt/src/gcc-trunk-obj/./prev-gcc/ 
-B/usr/local/x86_64-unknown-linux-gnu/bin/ 
-B/usr/local/x86_64-unknown-linux-gnu/bin/ 
-B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem 
/usr/local/x86_64-unknown-linux-gnu/include -isystem 
/usr/local/x86_64-unknown-linux-gnu/sys-include -c -g -O2 
-fprofile-generate -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat 
-Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -I. 
-I../../gcc-trunk/gcc -I../../gcc-trunk/gcc/. 
-I../../gcc-trunk/gcc/../include -I../../gcc-trunk/gcc/../libcpp/include 
-I../../gcc-trunk/gcc/../libdecnumber 
-I../../gcc-trunk/gcc/../libdecnumber/bid -I../libdecnumber -Iyes/include 
-Iyes/include -DCLOOG_PPL_BACKEND insn-emit.c -o insn-emit.o
matt     26824 61.4  4.2 148888 75004 pts/2    R+   01:27 624:18 
/home/matt/src/gcc-trunk-obj/./prev-gcc/cc1 -quiet -I. -I. 
-I../../gcc-trunk/gcc -I../../gcc-trunk/gcc/. 
-I../../gcc-trunk/gcc/../include -I../../gcc-trunk/gcc/../libcpp/include 
-I../../gcc-trunk/gcc/../libdecnumber 
-I../../gcc-trunk/gcc/../libdecnumber/bid -I../libdecnumber -Iyes/include 
-Iyes/include -iprefix 
/home/matt/src/gcc-trunk-obj/prev-gcc/../lib/gcc/x86_64-unknown-linux-gnu/4.5.0/ 
-isystem /home/matt/src/gcc-trunk-obj/./prev-gcc/include -isystem 
/home/matt/src/gcc-trunk-obj/./prev-gcc/include-fixed -DIN_GCC 
-DHAVE_CONFIG_H -DCLOOG_PPL_BACKEND -isystem 
/usr/local/x86_64-unknown-linux-gnu/include -isystem 
/usr/local/x86_64-unknown-linux-gnu/sys-include insn-emit.c -quiet 
-dumpbase insn-emit.c -mtune=generic -auxbase-strip insn-emit.o -g -O2 -W 
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual 
-Wold-style-definition -Wc++-compat -Wmissing-format-attribute -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror 
-fprofile-generate -fno-common -o /tmp/ccqjb9iL.s

Note that if I run this command (changing the output filename), removing 
all warnings, code generation qualifiers , and replacing -O2 with -O0, I 
still get the hang. Running the command under valgrind (3.4.1, default 
package on Ubuntu 9.04) reveals nothing and the hang still occurs.

Attaching to the hung process with gdb and doing a backtrace gives me this:
0x0000000000b369c6 in ggc_htab_delete (slot=0x2b99e313e710, 
info=0x2e56370)
     at ../../gcc-trunk/gcc/ggc-common.c:83
83        if (! (*r->marked_p) (*slot))
(gdb) bt
#0  0x0000000000b369c6 in ggc_htab_delete (slot=0x2b99e313e710, 
info=0x2e56370)
     at ../../gcc-trunk/gcc/ggc-common.c:83
#1  0x0000000002c8e63f in htab_traverse_noresize (htab=0x2b99c389a230,
     callback=0xb369a6 <ggc_htab_delete>, info=0x2e56370)
     at ../../gcc-trunk/libiberty/hashtab.c:750
#2  0x0000000000b3782c in ggc_mark_roots ()
     at ../../gcc-trunk/gcc/ggc-common.c:163
#3  0x00000000006797c1 in ggc_collect () at 
../../gcc-trunk/gcc/ggc-page.c:1944
#4  0x0000000000df1d98 in execute_todo (flags=132107)
     at ../../gcc-trunk/gcc/passes.c:1057
#5  0x0000000000df2574 in execute_one_pass (pass=0x3a5bae0)
     at ../../gcc-trunk/gcc/passes.c:1312
#6  0x0000000000df2647 in execute_pass_list (pass=0x3a5bae0)
     at ../../gcc-trunk/gcc/passes.c:1338
#7  0x0000000000df2665 in execute_pass_list (pass=0x3a56840)
     at ../../gcc-trunk/gcc/passes.c:1339
#8  0x00000000013ef59e in tree_rest_of_compilation (fndecl=0x2b99c8253600)
     at ../../gcc-trunk/gcc/tree-optimize.c:394
#9  0x0000000001c5ab96 in cgraph_expand_function (node=0x2b99c8253f00)
     at ../../gcc-trunk/gcc/cgraphunit.c:1097
#10 0x0000000001c5ad46 in cgraph_expand_all_functions ()
     at ../../gcc-trunk/gcc/cgraphunit.c:1156
#11 0x0000000001c5b315 in cgraph_optimize ()
     at ../../gcc-trunk/gcc/cgraphunit.c:1379
#12 0x00000000004ea5e4 in c_write_global_declarations ()
     at ../../gcc-trunk/gcc/c-decl.c:9398
#13 0x000000000118d879 in compile_file () at 
../../gcc-trunk/gcc/toplev.c:1036
#14 0x000000000118f976 in do_compile () at 
../../gcc-trunk/gcc/toplev.c:2345
#15 0x000000000118fa46 in toplev_main (argc=53, argv=0x7fffe72980f8)
     at ../../gcc-trunk/gcc/toplev.c:2390
#16 0x00000000006558bd in main (argc=53, argv=0x7fffe72980f8)
     at ../../gcc-trunk/gcc/main.c:35

I did some poking around and here are some possibly relevant clues:
ggc-common.c:84 is never hit (this line:" htab_clear_slot (*r->base, 
slot);"), onlyt line 86 is hit. The loop in htab_traverse_noresize() 
(hashtab.c:750) never exits. The callback on line 750 is called, but the 
break is never hit and the loop exit condition never occurs. 
htab_size(htab) returns 65521.

I configured with this commandline:
CFLAGS="-O3 -fgcse-lm -fgcse-sm -fgcse-las -ftree-loop-linear 
-funsafe-loop-optimizations -ftree-loop-im -ftree-loop-ivcanon -fivopts 
-fvariable-expansion-in-unroller -fweb -ffast-math -frename-registers 
-ftracer" CXXFLAGS="-O3 -fgcse-lm -fgcse-sm -fgcse-las -ftree-loop-linear 
-funsafe-loop-optimizations -ftree-loop-im -ftree-loop-ivcanon -fivopts 
-fvariable-expansion-in-unroller -fweb -ffast-math -frename-registers 
-ftracer" ../gcc-trunk/configure --enable-bootstrap 
--enable-stage1-checking=all --enable-languages=c,c++ --with-cloog 
--with-ppl --enable-lto --with-libelf

and this is my make commandline:

CFLAGS="-O3 -fgcse-lm -fgcse-sm -fgcse-las -ftree-loop-linear 
-funsafe-loop-optimizations -ftree-loop-im -ftree-loop-ivcanon -fivopts 
-fvariable-expansion-in-unroller -fweb -ffast-math -frename-registers 
-ftracer" CXXFLAGS="-O3 -fgcse-lm -fgcse-sm -fgcse-las -ftree-loop-linear 
-funsafe-loop-optimizations -ftree-loop-im -ftree-loop-ivcanon -fivopts 
-fvariable-expansion-in-unroller -fweb -ffast-math -frename-registers 
-ftracer" make -j3 profiledbootstrap && make check

This is easy to reproduce for me; let me know if there's any other 
specific debugging info I can provide.

Thanks in advance!


--
tangled strands of DNA explain the way that I behave.
http://www.clock.org/~matt



More information about the Gcc-help mailing list