Bug 256721 - www/chromium: 91.0.4472.114 crashes during build on clang 11+
Summary: www/chromium: 91.0.4472.114 crashes during build on clang 11+
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Dimitry Andric
URL:
Keywords: crash
Depends on:
Blocks:
 
Reported: 2021-06-19 20:17 UTC by Jan Beich
Modified: 2021-06-26 02:12 UTC (History)
3 users (show)

See Also:
dim: mfc-stable13+
dim: mfc-stable12+
dim: mfc-stable11+


Attachments
command line args (for clang 12) (19.41 KB, text/plain)
2021-06-19 20:17 UTC, Jan Beich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2021-06-19 20:17:18 UTC
Created attachment 225940 [details]
command line args (for clang 12)

c++ -MMD -MF obj/third_party/blink/renderer/core/core/ng_line_breaker.o.d -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DUSE_X11=1 -DOFFICIAL_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DCR_CLANG_REVISION=\"llvmorg-13-init-6429-g0e92cbd6-2\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DBLINK_CORE_IMPLEMENTATION=1 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DVK_USE_PLATFORM_XCB_KHR -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DBLINK_IMPLEMENTATION=1 -DINSIDE_BLINK -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DWEBRTC_BSD -DABSL_ALLOCATOR_NOTHROW=1 -DWEBRTC_USE_BUILTIN_ISAC_FIX=0 -DWEBRTC_USE_BUILTIN_ISAC_FLOAT=1 -DWEBRTC_USE_X11 -DWEBRTC_HAVE_SCTP -DNO_MAIN_THREAD_WRAPPING -DSK_UNTIL_CRBUG_1187654_IS_FIXED -DSK_FAVOR_WUFFS_V_0_3_OVER_V_0_2 -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_HAS_WUFFS_LIBRARY -DSK_VULKAN_HEADER=\"../../skia/config/SkVulkanConfig.h\" -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DVK_USE_PLATFORM_XCB_KHR -DV8_COMPRESS_POINTERS -DV8_COMPRESS_POINTERS_IN_ISOLATE_CAGE -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_DEPRECATION_WARNINGS -DCPPGC_CAGED_HEAP -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DWTF_USE_WEBAUDIO_PFFFT=1 -DUSE_BLINK_V8_BINDING_NEW_IDL_CALLBACK_FUNCTION -DUSE_BLINK_V8_BINDING_NEW_IDL_INTERFACE -DUSE_SYSTEM_LIBJPEG -DV8_COMPRESS_POINTERS -DV8_COMPRESS_POINTERS_IN_ISOLATE_CAGE -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_DEPRECATION_WARNINGS -DCPPGC_CAGED_HEAP -DV8_COMPRESS_POINTERS -DV8_COMPRESS_POINTERS_IN_ISOLATE_CAGE -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_DEPRECATION_WARNINGS -DCPPGC_CAGED_HEAP -DV8_COMPRESS_POINTERS -DV8_COMPRESS_POINTERS_IN_ISOLATE_CAGE -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_DEPRECATION_WARNINGS -DCPPGC_CAGED_HEAP -I../.. -Igen -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../third_party/libyuv/include -I../../third_party/jsoncpp/source/include -Igen/shim_headers/opus_shim -Igen/shim_headers/ffmpeg_shim -Igen/shim_headers/openh264_shim -Igen/shim_headers/libpng_shim -Igen/shim_headers/libwebp_shim -I../../third_party/vulkan-deps/vulkan-headers/src/include -I../../third_party/khronos -I../../gpu -Igen/shim_headers/snappy_shim -Igen/third_party/dawn/src/include -I../../third_party/dawn/src/include -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/protobuf/src -Igen/net/third_party/quiche/src -I../../net/third_party/quiche/overrides -I../../net/third_party/quiche/src/common/platform/default -I../../net/third_party/quiche/src -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen/third_party/webrtc -I../../third_party/skia -I../../third_party/wuffs/src/release/c -I../../third_party/vulkan/include -I../../third_party/vulkan-deps/vulkan-headers/src/include -I../../v8/include -Igen/v8/include -I../../third_party/mesa_headers -I../../third_party/libwebm/source -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/iccjpeg -I../../third_party/ots/src/include -I../../v8/include -Igen/v8/include -Igen/v8/include -I../../v8/include -I../../v8/include -Igen/v8/include -I../../third_party/zlib -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -flto=thin -fsplit-lto-unit -fwhole-program-vtables -m64 -march=x86-64 -msse3 -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -Wall -Wextra -Wimplicit-fallthrough -Wunreachable-code -Wthread-safety -Wextra-semi -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-thread-safety-analysis -Wno-thread-safety-attributes -fno-omit-frame-pointer -fprofile-instr-use=../../chrome/build/pgo_profiles/chrome-linux-4472-1622741475-1086de1fcd675b708e3ea02ae10a0fc9999c4956.profdata -Wno-profile-instr-unprofiled -Wno-profile-instr-out-of-date -Wno-backend-plugin -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -Wglobal-constructors -O2 -fdata-sections -ffunction-sections -g0 -Wshadow -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -Wconversion -Wno-float-conversion -Wno-sign-conversion -Wno-implicit-float-conversion -Wno-implicit-int-conversion -Wno-implicit-int-float-conversion -Wno-enum-float-conversion -DPROTOBUF_ALLOW_DEPRECATED=1 -Wno-shorten-64-to-32 -Wno-header-guard -I/usr/local/include -I/usr/local/include/nss -I/usr/local/include/nspr -I/usr/local/include/libpng16 -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include/libxml2 -std=c++14 -fno-trigraphs -Wno-trigraphs -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -Wno-deprecated-declarations -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -c ../../third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc -o obj/third_party/blink/renderer/core/core/ng_line_breaker.o
Assertion failed: ((Record->hasTrivialCopyConstructor() || Record->hasTrivialCopyAssignment() || Record->hasTrivialMoveConstructor() || Record->hasTrivialMoveAssignment() || Record->isUnion()) && "Trying to aggregate-copy a type without a trivial copy/move " "constructor or assignment operator"), function EmitAggregateCopy, file /usr/src/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp, line 2061.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ ... -o obj/third_party/blink/renderer/core/core/ng_line_breaker.o
1.	<eof> parser at end of file
2.	Per-file LLVM IR generation
3.	../../third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc:902:7: Generating code for declaration 'blink::NGLineBreaker::BreakText(blink::NGInlineItemResult *, const blink::NGInlineItem &, const blink::ShapeResult &, blink::LayoutUnit, blink::LayoutUnit, blink::NGLineInfo *)::(anonymous class)::__invoke'
#0 0x0000000004723541 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:565:13
#1 0x0000000004721715 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:72:18
#2 0x00000000046bb30e HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:75:5
#3 0x00000000046bb493 CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:0:51
#4 0x0000000805d01e90 handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 12.0.0 (git@github.com:llvm/llvm-project.git llvmorg-12.0.0-0-gd28af7c654d8)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
Comment 1 Jan Beich freebsd_committer freebsd_triage 2021-06-19 20:26:08 UTC
Comment on attachment 225940 [details]
command line args (for clang 12)

To reproduce:

$ fetch -o ng_line_breaker-1c2a9f.sh 'https://bugs.freebsd.org/bugzilla/attachment.cgi?id=225940'
$ fetch https://people.freebsd.org/~jbeich/ng_line_breaker-1c2a9f.cpp.xz
$ fetch https://people.freebsd.org/~jbeich/chrome-linux-4472-1622741475-1086de1fcd675b708e3ea02ae10a0fc9999c4956.profdata.xz
$ sed -i '' 's,../../chrome/build/pgo_profiles/,,g' ng_line_breaker-1c2a9f.sh
$ xz -d *.xz
$ sh ng_line_breaker-1c2a9f.sh
Assertion failed: ((Record->hasTrivialCopyConstructor() || Record->hasTrivialCopyAssignment() || Record->hasTrivialMoveConstructor() || Record->hasTrivialMoveAssignment() || Record->isUnion()) && "Trying to aggregate-copy a type without a trivial copy/move " "constructor or assignment operator"), function EmitAggregateCopy, file /usr/src/contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp, line 2061.
[...]
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2021-06-19 20:39:55 UTC
Hmm, is this really due to clang 12? Clang 11.0.1 also results in the same assertion, so I guess it is something new in Chromium...

As this file is rather huge it might take a while to reduce. :)
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2021-06-19 22:34:54 UTC
(In reply to Jan Beich from comment #3)
That's because stable branches have assertions turned off. :) I have a clang 11 here with assertions (from the base system, as the ports don't seem to have an option for this) and it asserts in exactly the same way.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2021-06-20 02:26:09 UTC
(In reply to Jan Beich from comment #0)

Is the build crash conditional on or scoped to any port options or other environment conditions?
Comment 6 Dimitry Andric freebsd_committer freebsd_triage 2021-06-21 13:00:09 UTC
(In reply to Kubilay Kocak from comment #5)
It'll abort on -CURRENT, where MK_LLVM_ASSERTIONS is on by default. On -STABLE branches, this is off by default. So unless somebody turns it on purposefully, it shouldn't happen.

That said, creduce is still going after ~30 hours of messing, reduced from 41M (and ~600k lines) to 8.2M (~1600 lines). It's slow going, even with 12 simultaneous clang instances...
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-06-21 18:51:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=e7e517981a6591c79fb49cd8810361b0f3ad5983

commit e7e517981a6591c79fb49cd8810361b0f3ad5983
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-06-21 18:46:34 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-06-21 18:48:37 +0000

    Fix clang assertion while building recent www/chromium

    Merge commit c8227f06b335 from llvm git (by Arthur Eubanks):

      [clang] Don't assert in EmitAggregateCopy on trivial_abi types

      Fixes PR42961.

      Reviewed By: rnk

      Differential Revision: https://reviews.llvm.org/D97872

    PR:             256721, 255570
    Reported by:    jbeich
    MFC after:      3 days

 contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 8 Dimitry Andric freebsd_committer freebsd_triage 2021-06-21 18:54:09 UTC
In progress; will MFC this to stable/12 (and maybe stable/11) too, so people using MK_LLVM_ASSERTIONS=yes there can still build Chromium.
Comment 9 commit-hook freebsd_committer freebsd_triage 2021-06-25 17:32:38 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=1ed4655d9d5aab333eb5a89fafc2080315a0af79

commit 1ed4655d9d5aab333eb5a89fafc2080315a0af79
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-06-21 18:46:34 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-06-25 17:30:41 +0000

    Fix clang assertion while building recent www/chromium

    Merge commit c8227f06b335 from llvm git (by Arthur Eubanks):

      [clang] Don't assert in EmitAggregateCopy on trivial_abi types

      Fixes PR42961.

      Reviewed By: rnk

      Differential Revision: https://reviews.llvm.org/D97872

    PR:             256721, 255570
    Reported by:    jbeich

    (cherry picked from commit e7e517981a6591c79fb49cd8810361b0f3ad5983)

 contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2021-06-25 17:33:40 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=858dc467c63c1be107808bcef9198591416ac71c

commit 858dc467c63c1be107808bcef9198591416ac71c
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-06-21 18:46:34 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-06-25 17:31:22 +0000

    Fix clang assertion while building recent www/chromium

    Merge commit c8227f06b335 from llvm git (by Arthur Eubanks):

      [clang] Don't assert in EmitAggregateCopy on trivial_abi types

      Fixes PR42961.

      Reviewed By: rnk

      Differential Revision: https://reviews.llvm.org/D97872

    PR:             256721, 255570
    Reported by:    jbeich

    (cherry picked from commit e7e517981a6591c79fb49cd8810361b0f3ad5983)

 contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 11 commit-hook freebsd_committer freebsd_triage 2021-06-25 17:34:42 UTC
A commit in branch stable/11 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=591bd6a9b85d233bbef5eeaae46454f5994bf42f

commit 591bd6a9b85d233bbef5eeaae46454f5994bf42f
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-06-21 18:46:34 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-06-25 17:31:48 +0000

    Fix clang assertion while building recent www/chromium

    Merge commit c8227f06b335 from llvm git (by Arthur Eubanks):

      [clang] Don't assert in EmitAggregateCopy on trivial_abi types

      Fixes PR42961.

      Reviewed By: rnk

      Differential Revision: https://reviews.llvm.org/D97872

    PR:             256721, 255570
    Reported by:    jbeich

    (cherry picked from commit e7e517981a6591c79fb49cd8810361b0f3ad5983)

 contrib/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 12 Kubilay Kocak freebsd_committer freebsd_triage 2021-06-26 02:12:40 UTC
^Triage: 

- Closing, committed in main and merged. Re-open if there's additional changes to come with details.

- Assign to committer that resolved