Summary: | sys-devel/gcc: ICE in in vectorizable_live_operation, at tree-vect-loop.cc when building www-client/chromium | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Kenton Groombridge <rustyvega> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cafaia, chromium, lmiphay, mail, peter_sliepenbeek, t-mo |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109573 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Part 1 of build.log, used spllit as it was too big.
Part 2 of build.log, used spllit as it was too big. |
Description
Kenton Groombridge
2023-04-17 11:53:28 UTC
Created attachment 860241 [details]
Part 1 of build.log, used spllit as it was too big.
Created attachment 860242 [details]
Part 2 of build.log, used spllit as it was too big.
[31mFAILED: [0mobj/v8/v8_base_without_compiler/maglev-assembler-x64.o x86_64-pc-linux-gnu-g++ -MMD -MF obj/v8/v8_base_without_compiler/maglev-assembler-x64.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DV8_INTL_SUPPORT -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_ATOMIC_OBJECT_FIELD_WRITES -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_SHARED_RO_HEAP -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_SHORT_BUILTIN_CALLS -DV8_EXTERNAL_CODE_SPACE -DV8_ENABLE_MAGLEV -DV8_ENABLE_TURBOFAN -DV8_ENABLE_WEBASSEMBLY -DV8_ALLOCATION_FOLDING -DV8_ALLOCATION_SITE_TRACKING -DV8_ADVANCED_BIGINT_ALGORITHMS -DV8_STATIC_ROOTS -DV8_USE_ZLIB -DV8_USE_LIBM_TRIG_FUNCTIONS -DV8_ENABLE_WASM_SIMD256_REVEC -DV8_COMPRESS_POINTERS -DV8_COMPRESS_POINTERS_IN_SHARED_CAGE -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_ENABLE_SANDBOX -DV8_DEPRECATION_WARNINGS -DCPPGC_CAGED_HEAP -DCPPGC_YOUNG_GENERATION -DCPPGC_POINTER_COMPRESSION -DCPPGC_SLIM_WRITE_BARRIER -DV8_TARGET_ARCH_X64 -DV8_HAVE_TARGET_OS -DV8_TARGET_OS_LINUX -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DU_IMPORT=U_EXPORT -DUSE_SYSTEM_ZLIB=1 -I../.. -Igen -I../../v8 -I../../v8/include -Igen/v8 -Igen/v8/include -Igen/shim_headers/icui18n_shim -Igen/shim_headers/icuuc_shim -Igen/shim_headers/zlib_shim -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comments -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -fno-omit-frame-pointer -fvisibility=hidden -Wno-strict-overflow -Wno-return-type -Wno-int-in-bool-context -Wno-deprecated -Wno-narrowing -Wno-class-memaccess -std=gnu++2a -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -O2 -pipe -march=native -mtune=native -c ../../v8/src/maglev/x64/maglev-assembler-x64.cc -o obj/v8/v8_base_without_compiler/maglev-assembler-x64.o during GIMPLE pass: slp ../../v8/src/maglev/x64/maglev-assembler-x64.cc: In member function ‘void v8::internal::maglev::MaglevAssembler::Prologue(v8::internal::maglev::Graph*)’: ../../v8/src/maglev/x64/maglev-assembler-x64.cc:515:6: internal compiler error: in vectorizable_live_operation, at tree-vect-loop.cc:9050 515 | void MaglevAssembler::Prologue(Graph* graph) { | ^~~~~~~~~~~~~~~ 0x1bc088e internal_error(char const*, ...) ???:0 0x697a72 fancy_abort(char const*, int, char const*) ???:0 0x1b80662 vect_transform_stmt(vec_info*, _stmt_vec_info*, gimple_stmt_iterator*, _slp_tree*, _slp_instance*) ???:0 0xffda93 vect_schedule_slp(vec_info*, vec<_slp_instance*, va_heap, vl_ptr> const&) ???:0 0x1000995 vect_slp_function(function*) ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://bugs.gentoo.org/> for instructions. Would you mind following https://wiki.gentoo.org/wiki/GCC_ICE_reporting_guide as much as you can, and we can help with any bits you get stuck on? Will do. Thanks. I've hit the same problem when building www-client/chromium-112.0.5615.121 with sys-devel/gcc-12.2.1_p20230304 and "-march=ivybridge". It did *not* happen with "-march=skylake". Adding "-fno-tree-vectorize" to CXXFLAGS made chromium build successfully for me. That's a bit strange since AFAIK tree vectorization should *not* be enabled by default at -O2 level, only -O3. The above is obviously just a workaround to make chromium build, GCC should not ICE even with all the optimization options turned on. (In reply to Maciej S. Szmigiero from comment #6) > That's a bit strange since AFAIK tree vectorization should *not* be enabled > by default at -O2 level, only -O3. GCC 12 introduces vectorisation at -O2 using -fvect-cost-model=very-cheap ('very-cheap' being a new level they introduced in the 12 release). Reproduced: ``` FAILED: obj/v8/v8_base_without_compiler/maglev-assembler-x64.o g++-12 -MMD -MF obj/v8/v8_base_without_compiler/maglev-assembler-x64.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DV8_INTL_SUPPORT -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_ATOMIC_OBJECT_FIELD_WRITES -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_SHARED_RO_HEAP -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_SHORT_BUILTIN_CALLS -DV8_EXTERNAL_CODE_SPACE -DV8_ENABLE_MAGLEV -DV8_ENABLE_TURBOFAN -DV8_ENABLE_WEBASSEMBLY -DV8_ALLOCATION_FOLDING -DV8_ALLOCATION_SITE_TRACKING -DV8_ADVANCED_BIGINT_ALGORITHMS -DV8_STATIC_ROOTS -DV8_USE_ZLIB -DV8_USE_LIBM_TRIG_FUNCTIONS -DV8_ENABLE_WASM_SIMD256_REVEC -DV8_COMPRESS_POINTERS -DV8_COMPRESS_POINTERS_IN_SHARED_CAGE -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_ENABLE_SANDBOX -DV8_DEPRECATION_WARNINGS -DCPPGC_CAGED_HEAP -DCPPGC_YOUNG_GENERATION -DCPPGC_POINTER_COMPRESSION -DCPPGC_SLIM_WRITE_BARRIER -DV8_TARGET_ARCH_X64 -DV8_HAVE_TARGET_OS -DV8_TARGET_OS_LINUX -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DU_IMPORT=U_EXPORT -DUSE_SYSTEM_ZLIB=1 -I../.. -Igen -I../../v8 -I../../v8/include -Igen/v8 -Igen/v8/include -Igen/shim_headers/icui18n_shim -Igen/shim_headers/icuuc_shim -Igen/shim_headers/zlib_shim -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comments -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -fno-omit-frame-pointer -fvisibility=hidden -Wno-strict-overflow -Wno-return-type -Wno-int-in-bool-context -Wno-deprecated -Wno-narrowing -Wno-class-memaccess -std=gnu++2a -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -O2 -march=ivybridge -pipe -O2 -march=ivybridge -pipe -c ../../v8/src/maglev/x64/maglev-assembler-x64.cc -o obj/v8/v8_base_without_compiler/maglev-assembler-x64.o during GIMPLE pass: slp ../../v8/src/maglev/x64/maglev-assembler-x64.cc: In member function 'void v8::internal::maglev::MaglevAssembler::Prologue(v8::internal::maglev::Graph*)': ../../v8/src/maglev/x64/maglev-assembler-x64.cc:515:6: internal compiler error: in vectorizable_live_operation, at tree-vect-loop.cc:9060 515 | void MaglevAssembler::Prologue(Graph* graph) { | ^~~~~~~~~~~~~~~ 0x67dc34 vectorizable_live_operation(vec_info*, _stmt_vec_info*, gimple_stmt_iterator*, _slp_tree*, _slp_instance*, int, bool, vec<stmt_info_for_cost, va_heap, vl_ptr>*) /usr/src/debug/sys-devel/gcc-12.2.1_p20230415/gcc-12-20230415/gcc/tree-vect-loop.cc:9060 0x1bc9120 can_vectorize_live_stmts /usr/src/debug/sys-devel/gcc-12.2.1_p20230415/gcc-12-20230415/gcc/tree-vect-stmts.cc:11059 0x1beebe2 vect_transform_stmt(vec_info*, _stmt_vec_info*, gimple_stmt_iterator*, _slp_tree*, _slp_instance*) /usr/src/debug/sys-devel/gcc-12.2.1_p20230415/gcc-12-20230415/gcc/tree-vect-stmts.cc:11451 0x10293a0 vect_schedule_slp_node /usr/src/debug/sys-devel/gcc-12.2.1_p20230415/gcc-12-20230415/gcc/tree-vect-slp.cc:7385 0x103981c vect_schedule_scc /usr/src/debug/sys-devel/gcc-12.2.1_p20230415/gcc-12-20230415/gcc/tree-vect-slp.cc:7580 0x10395d2 vect_schedule_scc /usr/src/debug/sys-devel/gcc-12.2.1_p20230415/gcc-12-20230415/gcc/tree-vect-slp.cc:7561 0x1039d5c vect_schedule_slp(vec_info*, vec<_slp_instance*, va_heap, vl_ptr> const&) /usr/src/debug/sys-devel/gcc-12.2.1_p20230415/gcc-12-20230415/gcc/tree-vect-slp.cc:7697 0x103b91e vect_slp_region /usr/src/debug/sys-devel/gcc-12.2.1_p20230415/gcc-12-20230415/gcc/tree-vect-slp.cc:6045 0x103ca49 vect_slp_bbs /usr/src/debug/sys-devel/gcc-12.2.1_p20230415/gcc-12-20230415/gcc/tree-vect-slp.cc:6157 0x103cdd7 vect_slp_function(function*) /usr/src/debug/sys-devel/gcc-12.2.1_p20230415/gcc-12-20230415/gcc/tree-vect-slp.cc:6245 0x1044041 execute /usr/src/debug/sys-devel/gcc-12.2.1_p20230415/gcc-12-20230415/gcc/tree-vectorizer.cc:1506 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://bugs.gentoo.org/> for instructions. ``` Reporting upstream. The issue is fixed on my IvyBridge systems with the following upstream patch for sys-devel/gcc-12.2.1_p20230121-r1 https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=cddfe6bc40b3dc0806e260bbfb4cac82d609a258 (In reply to David from comment #10) > The issue is fixed on my IvyBridge systems with the following upstream patch > for sys-devel/gcc-12.2.1_p20230121-r1 > > > https://gcc.gnu.org/git/?p=gcc.git;a=patch; > h=cddfe6bc40b3dc0806e260bbfb4cac82d609a258 Yeah, my intention is to chuck it in to today's 12 snapshot (which will be created tonight). It'll get backported upstream eventually too, probably/hopefully in time for 12.3. [after spending a day compiling...] gcc (Gentoo 12.2.1_p20230121-r1 p10) 12.2.1 20230121 chromium 112.0.5615.121 fails with -O2 -march=haswell *** Bug 904817 has been marked as a duplicate of this bug. *** The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04451d884241269c61aa5c1797f1cdf72041fe9a commit 04451d884241269c61aa5c1797f1cdf72041fe9a Author: Sam James <sam@gentoo.org> AuthorDate: 2023-04-22 10:50:04 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-04-22 10:51:22 +0000 sys-devel/gcc: add 12.2.1_p20230421 Unkeyworded at first like usual. I don't intend on keywording this one given 12.3 will be out soon enough. Bug: https://bugs.gentoo.org/904455 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc/Manifest | 2 ++ sys-devel/gcc/gcc-12.2.1_p20230421.ebuild | 54 +++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b80bfab7c8aba8c3a358b2fa87a1e00e335376d3 commit b80bfab7c8aba8c3a358b2fa87a1e00e335376d3 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2023-04-22 23:26:46 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2023-04-22 23:28:44 +0000 www-client/chromium: add 112.0.5615.165 Bug: https://bugs.gentoo.org/904455 Bug: https://bugs.gentoo.org/904725 Bug: https://bugs.gentoo.org/904560 Signed-off-by: Mike Gilbert <floppym@gentoo.org> www-client/chromium/Manifest | 1 + www-client/chromium/chromium-112.0.5615.165.ebuild | 1259 ++++++++++++++++++++ .../chromium/files/chromium-112-swiftshader.patch | 74 ++ 3 files changed, 1334 insertions(+) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ffa606b25a8535e81f34e661ef0da04dee80d72b commit ffa606b25a8535e81f34e661ef0da04dee80d72b Author: Sam James <sam@gentoo.org> AuthorDate: 2023-04-22 10:35:44 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-04-22 10:35:44 +0000 12.2.0: add chromium ICE patch Bug: https://bugs.gentoo.org/904455 Signed-off-by: Sam James <sam@gentoo.org> ...573_12_ICE-in-vectorizable_live_operation.patch | 131 +++++++++++++++++++++ 12.2.0/gentoo/README.history | 3 + 2 files changed, 134 insertions(+) chromium-112.0.5615.165.ebuild has a workaround - adding -fno-tree-vectorize for gcc and newer GCCs are fixed, including the upcoming GCC 12.3 (in gentoo at least, unclear if backport will be done in time upstream). AFAIK older stable chromium was never a problem, just newly stabled 112, so closing. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58875b7c918212a9e9efeb5a6d9f54ec029ba3d4 commit 58875b7c918212a9e9efeb5a6d9f54ec029ba3d4 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-04-26 13:25:42 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-04-26 13:27:17 +0000 sys-devel/gcc: add 13.1.0-r1 w/ backports This includes the chromium ICE fix for bug #904455 as well as two miscompilation fixes which just missed the 13.1.0 tag. Bug: https://bugs.gentoo.org/904455 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc/Manifest | 2 ++ sys-devel/gcc/gcc-13.1.0-r1.ebuild | 61 ++++++++++++++++++++++++++++++++++++++ sys-devel/gcc/gcc-13.2.9999.ebuild | 4 +-- 3 files changed, 65 insertions(+), 2 deletions(-) |