Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 838094 - sys-devel/gcc-11.2.1_p20220115 : ICE when compiling PGO+LTO'd Pythons
Summary: sys-devel/gcc-11.2.1_p20220115 : ICE when compiling PGO+LTO'd Pythons
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://gcc.gnu.org/git/?p=gcc.git;a=...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-12 14:56 UTC by John Helmert III
Modified: 2023-09-23 20:26 UTC (History)
2 users (show)

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


Attachments
listobject.i (listobject.i,665.17 KB, text/plain)
2022-04-12 14:56 UTC, John Helmert III
Details
python-3.10.4.build.log (build.log,274.64 KB, text/x-log)
2022-04-12 14:58 UTC, John Helmert III
Details
python-3.9.12.build.log (build.log,275.54 KB, text/x-log)
2022-04-12 14:58 UTC, John Helmert III
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-04-12 14:56:35 UTC
Created attachment 770381 [details]
listobject.i

I've been able to trigger this via both listobject.c and descrobject.c.

/var/tmp/portage/dev-lang/python-3.9.12/work/Python-3.9.12 # gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/11.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/11.2.1 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.2.1 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.2.1/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.2.1/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/include/g++-v11 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/11.2.1/python --enable-languages=c,c++,go,objc,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=yes --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 11.2.1_p20220115 p4' --disable-esp --enable-libstdcxx-time --with-build-config=bootstrap-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libssp --disable-libada --disable-cet --disable-systemtap --disable-valgrind-annotations --disable-vtable-verify --disable-libvtv --without-zstd --enable-lto --with-isl --disable-isl-version-check --enable-default-pie --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.1 20220115 (Gentoo 11.2.1_p20220115 p4)

/var/tmp/portage/dev-lang/python-3.9.12/work/Python-3.9.12 # x86_64-pc-linux-gnu-gcc -c -Wno-unused-result -Wsign-compare -DNDEBUG     -march=znver1 -O2 -pipe -ggdb -O0 -fwrapv -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-use -fprofile-correction -I./Include/internal  -I. -I./Include -I/usr/include/ncursesw  -fPIC -DPy_BUILD_CORE -o Objects/listobject.o Objects/listobject.c -save-temps
x86_64-pc-linux-gnu-gcc: warning: ‘-pipe’ ignored because ‘-save-temps’ specified
during IPA pass: modref
Objects/listobject.c:3403:1: internal compiler error: in stream_out_histogram_value, at value-prof.c:340
 3403 | }
      | ^
0xc7dd84 stream_out_histogram_value(output_block*, histogram_value_t*)
        /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/value-prof.c:340
0x8492af output_gimple_stmt
        /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/gimple-streamer-out.c:192
0x8492af output_bb(output_block*, basic_block_def*, function*)
        /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/gimple-streamer-out.c:227
0x117c68d output_function
        /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/lto-streamer-out.c:2450
0x117c68d lto_output()
        /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/lto-streamer-out.c:2793
0x15e48df write_lto
        /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/passes.c:2680
0x736761 ipa_write_summaries_1
        /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/passes.c:2744
0x736761 ipa_write_summaries()
        /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/passes.c:2800
0x10d8ab7 ipa_passes
        /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/cgraphunit.c:2204
0x10d8ab7 symbol_table::compile()
        /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/cgraphunit.c:2291
0x15b1c84 symbol_table::finalize_compilation_unit()
        /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/cgraphunit.c:2539
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
Comment 1 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-04-12 14:58:02 UTC
Created attachment 770384 [details]
python-3.10.4.build.log
Comment 2 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-04-12 14:58:36 UTC
Created attachment 770387 [details]
python-3.9.12.build.log
Comment 3 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-04-12 15:00:08 UTC
Thread 2.1 "cc1" hit Breakpoint 1, internal_error (gmsgid=gmsgid@entry=0x1d64e62 "in %s, at %s:%d") at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/diagnostic.c:1803
1803    {
(gdb) bt
#0  internal_error (gmsgid=gmsgid@entry=0x1d64e62 "in %s, at %s:%d") at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/diagnostic.c:1803
#1  0x0000000000f568b6 in fancy_abort (file=0x1cf47b0 "/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/gcc/value-prof.c", line=340,
    function=0x1cf3546 "stream_out_histogram_value") at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/diagnostic.c:1907
#2  0x0000000000c7dd85 in stream_out_histogram_value (ob=0x2412640, hist=<optimized out>) at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/value-prof.c:340
#3  0x00000000008492b0 in output_gimple_stmt (stmt=0x7ffff6c34b40, fn=<optimized out>, ob=0x2412640)
    at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/gimple-streamer-out.c:192
#4  output_bb (ob=0x2412640, bb=<optimized out>, fn=<optimized out>) at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/gimple-streamer-out.c:227
#5  0x000000000117c68e in output_function (node=0x7ffff6f31550) at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/lto-streamer-out.c:2450
#6  lto_output () at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/lto-streamer-out.c:2793
#7  0x00000000015e48e0 in write_lto () at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/passes.c:2680
#8  0x0000000000736762 in ipa_write_summaries_1 (encoder=0x2257be0) at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/passes.c:2744
#9  ipa_write_summaries () at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/passes.c:2800
#10 0x00000000010d8ab8 in ipa_passes () at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/cgraphunit.c:2204
#11 symbol_table::compile (this=0x7ffff7704000) at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/cgraphunit.c:2291
#12 0x00000000015b1c85 in symbol_table::finalize_compilation_unit (this=0x7ffff7704000) at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/cgraphunit.c:2539
#13 0x000000000159b4f2 in compile_file () at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/toplev.c:482
#14 0x0000000001577561 in do_compile () at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/toplev.c:2205
#15 toplev::main (this=this@entry=0x7fffffffd7b6, argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/toplev.c:2344
#16 0x000000000157699c in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/sys-devel/gcc-11.2.1_p20220115/gcc-11-20220115/gcc/main.c:39
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-13 06:13:58 UTC
Please forward upstream; may need to tar up the dir and try extract the profiles too?
Comment 5 Sergei Trofimovich 2022-04-15 06:41:35 UTC
https://gcc.gnu.org/PR105282
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-15 06:44:23 UTC
(In reply to Sergei Trofimovich from comment #5)
> https://gcc.gnu.org/PR105282

Thanks!
Comment 7 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-04-21 02:46:46 UTC
Thanks Slyfox!
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-11 01:50:21 UTC
Fixed in 12.1 and will be in the next version after 11.3.0 (inc. snapshots).