Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Crash on OpenBSD compiling ports/www/chromium #38748

Closed Quuxplusone closed 4 years ago

Quuxplusone commented 5 years ago
Bugzilla Link PR39776
Status RESOLVED INVALID
Importance P enhancement
Reported by Levi Neely (lneely@sdf.lonestar.org)
Reported on 2018-11-25 06:50:27 -0800
Last modified on 2020-08-11 00:31:32 -0700
Version 6.0
Hardware PC OpenBSD
CC aaronpuchert@alice-dsl.net, blitzrakete@gmail.com, brad@comstyle.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
Fixed by commit(s)
Attachments browser_jumbo_15-e948b2.sh (17883 bytes, application/x-shellscript)
Blocks
Blocked by
See also
Created attachment 21151
clang run script

OpenBSD 6.4, compiling ports/www/chromium, browser_jumbo_15.cc:

BACKTRACE:

[274/1138] CXX obj/content/browser/browser/browser_jumbo_15.o
FAILED: obj/content/browser/browser/browser_jumbo_15.o
c++ -MMD -MF obj/content/browser/browser/browser_jumbo_15.o.d -
DENABLE_SCREEN_CAPTURE=1 -DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DUSE_GLIB=1 -
DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -
DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -
D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -
DCR_CLANG_REVISION=\"337439-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -
DCONTENT_IMPLEMENTATION -DV8_USE_EXTERNAL_STARTUP_DATA -
DATK_LIB_DIR=\"/usr/local/lib\" -DUSE_ATK_BRIDGE -
DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -
DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DWEBP_EXTERN=extern -
DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DVK_NO_PROTOTYPES -DTOOLKIT_VIEWS=1 -
DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -
DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -
DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD
-DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_HAS_PNG_LIBRARY -
DSK_HAS_WEBP_LIBRARY -DSK_HAS_JPEG_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_NO_PROTOTYPES -DLEVELDB_PLATFORM_CHROMIUM=1 -
DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DGTEST_RELATIVE_PATH -
DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DWEBRTC_BSD -
DABSL_ALLOCATOR_NOTHROW=1 -DNO_MAIN_THREAD_WRAPPING -DFLAC__NO_DLL -I. -I../.. -
Igen -Igen/shim_headers/libevent_shim -I../../third_party/libwebp/src -
I../../third_party/khronos -I../../gpu -I../../third_party/libyuv/include -
I../../third_party/vulkan/include -I../../third_party/ced/src -
I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -
I../../third_party/protobuf/src -I../../skia/config -I../../skia/ext -
I../../third_party/skia/include/c -I../../third_party/skia/include/config -
I../../third_party/skia/include/core -I../../third_party/skia/include/effects -
I../../third_party/skia/include/encode -I../../third_party/skia/include/gpu -
I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -
I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -
I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -
I../../third_party/skia/include/utils -I../../third_party/vulkan/include -
I../../third_party/skia/third_party/vulkanmemoryallocator -
I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -
I../../third_party/vulkan/include -I../../third_party/libwebm/source -
I../../third_party/protobuf/src -Igen/protoc_out -
I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -
I../../third_party/leveldatabase/src/include -
I../../third_party/webrtc_overrides -I../../testing/gtest/include -
I../../third_party/webrtc -I../../third_party/webrtc_overrides -
I../../third_party/webrtc -Igen/third_party/metrics_proto -
I../../third_party/boringssl/src/include -I../../v8/include -Igen/v8/include -
I../../third_party/mesa/src/include -I../../third_party/perfetto/include -
Igen/third_party/perfetto/protos -Igen/third_party/perfetto/protos -
Igen/third_party/perfetto/protos -
I../../third_party/angle/src/common/third_party/base -Igen/angle -
I../../third_party/brotli/include -I../../third_party/re2/src -
I../../third_party/zlib -I../../third_party/fontconfig/src -fprofile-sample-
use=../../chrome/android/profiles/afdo.prof -fno-strict-aliasing --param=ssp-
buffer-size=4 -fstack-protector -funwind-tables -fPIC -pthread -fcolor-
diagnostics -fmerge-all-constants -no-canonical-prefixes -m64 -march=x86-64 -
Wall -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-
initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-
default -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-
address-of-packed-member -Wno-nonportable-include-path -Wno-user-defined-
warnings -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-
compare-switch -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-
frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -
Wtautological-overlap-compare -Wexit-time-destructors -Wshadow -Wno-unused-
function -Wno-unused-local-typedef -isystem../../../../../../include/atk-1.0 -
isystem../../../../../../include/at-spi2-atk/2.0 -
isystem../../../../../../include/at-spi-2.0 -
isystem../../../../../../include/dbus-1.0 -isystem../../../../../../lib/dbus-
1.0/include -isystem../../../../../../include/glib-2.0 -
isystem../../../../../../lib/glib-2.0/include -isystem../../../../../../include
-isystem../../../../../../include/glib-2.0 -isystem../../../../../../lib/glib-
2.0/include -isystem../../../../../../include -
isystem../../../../../../include/pango-1.0 -
isystem../../../../../../include/harfbuzz -isystem../../../../../../include -
isystem../../../../../../include/fribidi -
isystem../../../../../../include/cairo -isystem../../../../../../include/glib-
2.0 -isystem../../../../../../lib/glib-2.0/include -
isystem../../../../../../../X11R6/include/pixman-1 -
isystem../../../../../../../X11R6/include -
isystem../../../../../../include/libpng16 -Wno-header-guard -
isystem../../../../../../include/nss -isystem../../../../../../include/nspr -
isystem ../../third_party/abseil-cpp -isystem../../../../../../include/dbus-1.0
-isystem../../../../../../lib/dbus-1.0/include -std=gnu++14 -fno-exceptions -
fno-rtti -fvisibility-inlines-hidden -idirafter /usr/local/include -idirafter
/usr/X11R6/include -c gen/content/browser/browser_jumbo_15.cc -o
obj/content/browser/browser/browser_jumbo_15.o
terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
c++: error: unable to execute command: Abort trap (core dumped)
c++: error: clang frontend command failed due to signal (use -v to see
invocation)
OpenBSD clang version 6.0.0 (tags/RELEASE_600/final) (based on LLVM 6.0.0)
Target: amd64-unknown-openbsd6.4
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/
and include the crash backtrace, preprocessed source, and associated run script.
c++: note: diagnostic msg:

!!!! UNABLE TO ATTACH PREPROCESSED SOURCE (SIZE ~= 36.2MB) -- PLEASE ADVISE !!!!
Quuxplusone commented 5 years ago

Attached browser_jumbo_15-e948b2.sh (17883 bytes, application/x-shellscript): clang run script

Quuxplusone commented 5 years ago

UPDATE: Uploaded pre-processed source to my web space.

http://lneely.feckov.org/browser_jumbo_15-e948b2.cpp

Quuxplusone commented 5 years ago

Well, std::bad_alloc just means you ran out of memory. There could be some runaway memory allocation, but it's much more likely just resource exhaustion. On Linux I can't observe any exceptions with your file, but there is around 1.3 GB of memory being allocated with Clang 6. With multiple compile jobs running at the same time it's not unreasonable to run out of memory then.

As a practical advice: reduce the number of concurrent compile jobs or just try again.

Maybe the error reporting could be improved here. Maybe we shouldn't suggest filing a bug report if we have an uncaught exception (though by default LLVM is compiled without exception support) of type std::bad_alloc, and instead point to the likely reason of resource exhaustion.

So I'm assigning this to the driver component, but since -fexceptions is not the default they might decide not to anything about this.