New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 610440 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Clang compile crashing on Mac

Project Member Reported by dmazz...@chromium.org, May 9 2016

Issue description

Sorry if this is a duplicate, I couldn't find a similar bug.

Recently Clang has started to crash on me quite frequently. I'm compiling locally on a MacBook Pro. If I keep trying again it succeeds and then just hits the same issue later on in the compile.

My GYP_DEFINES: mac_strip_release=0 dcheck_always_on=1 component=shared_library

Every error is different. I'm seeing illegal instructions, access violations, and internal assertions.

Maybe something got corrupted? Just hoping someone's experienced this before and knows the best resolution.

Example error:

[330/7948] CXX obj/third_party/WebKit/Source/core/html/webcore_shared.ImageDocument.o
FAILED: obj/third_party/WebKit/Source/core/html/webcore_shared.ImageDocument.o 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/WebKit/Source/core/html/webcore_shared.ImageDocument.o.d -DV8_DEPRECATION_WARNINGS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=268813-1 -DCOMPONENT_BUILD -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DENABLE_PEPPER_CDMS -DENABLE_NOTIFICATIONS -DENABLE_TOPCHROME_MD=1 -DDCHECK_ALWAYS_ON=1 -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DBLINK_CORE_IMPLEMENTATION=1 -DBLINK_IMPLEMENTATION=1 -DINSIDE_BLINK -DMOJO_USE_SYSTEM_IMPL -DCHROME_PNG_WRITE_SUPPORT -DPNG_USER_CONFIG -DENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0 -DENABLE_OILPAN=1 -DWTF_USE_CONCATENATED_IMPULSE_RESPONSES=1 -DWTF_USE_ICCJPEG=1 -DWTF_USE_QCMSLIB=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -DSKIA_DLL -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_SUPPORT_GPU=1 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DLIBXML_STATIC -DLIBXSLT_STATIC -DV8_SHARED -DUSING_V8_SHARED -DUSE_LIBPCI=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../../third_party/WebKit/Source -Igen/blink -I../../third_party/WebKit -I../../third_party/WebKit/Source/core/testing -I../../third_party/WebKit/Source/core/testing/v8 -I../.. -I../../skia/config -I../../third_party/khronos -I../../gpu -Igen/angle -I../../third_party/angle/include -Igen/third_party/WebKit -I../../third_party/iccjpeg -I../../third_party/libpng -I../../third_party/libwebp -I../../third_party/ots/include -I../../third_party/zlib -I../../third_party/libjpeg_turbo -I../../third_party/icu/source/i18n -I../../third_party/icu/source/common -I../../skia/ext -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/utils/mac -I../../third_party/libxml/mac/include -I../../third_party/libxml/src/include -I../../third_party/libxslt -I../../third_party/qcms/src -I../../third_party/snappy/mac -I../../third_party/snappy/src -I../../v8/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -O2 -gdwarf-2 -fvisibility=hidden -Werror -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wglobal-constructors -Wexit-time-destructors -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /Users/dmazzoni/src/gitchrome2/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansion -Xclang -plugin-arg-find-bad-constructs -Xclang check-implicit-copy-ctors -fcolor-diagnostics -fno-strict-aliasing -Xclang -load -Xclang /Users/dmazzoni/src/gitchrome2/src/third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.dylib -Xclang -add-plugin -Xclang blink-gc-plugin -include obj/third_party/WebKit/Source/build/mac/webcore_shared.Prefix.h-cc -c ../../third_party/WebKit/Source/core/html/ImageDocument.cpp -o obj/third_party/WebKit/Source/core/html/webcore_shared.ImageDocument.o
0  clang                    0x0000000110a7c5eb llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  clang                    0x0000000110a7b7f6 llvm::sys::RunSignalHandlers() + 70
2  clang                    0x0000000110a7ce34 abort + 900
3  libsystem_platform.dylib 0x00007fff8320552a _sigtramp + 26
4  libsystem_platform.dylib 0x000000011feb8000 _sigtramp + 2630560496
5  clang                    0x000000011061efd8 bool std::__1::__insertion_sort_incomplete<std::__1::__less<std::__1::pair<llvm::BasicBlock*, llvm::Value*>, std::__1::pair<llvm::BasicBlock*, llvm::Value*> >&, std::__1::pair<llvm::BasicBlock*, llvm::Value*>*>(std::__1::pair<llvm::BasicBlock*, llvm::Value*>*, std::__1::pair<llvm::BasicBlock*, llvm::Value*>*, std::__1::__less<std::__1::pair<llvm::BasicBlock*, llvm::Value*>, std::__1::pair<llvm::BasicBlock*, llvm::Value*> >&) + 34872
6  clang                    0x000000011061d7f4 bool std::__1::__insertion_sort_incomplete<std::__1::__less<std::__1::pair<llvm::BasicBlock*, llvm::Value*>, std::__1::pair<llvm::BasicBlock*, llvm::Value*> >&, std::__1::pair<llvm::BasicBlock*, llvm::Value*>*>(std::__1::pair<llvm::BasicBlock*, llvm::Value*>*, std::__1::pair<llvm::BasicBlock*, llvm::Value*>*, std::__1::__less<std::__1::pair<llvm::BasicBlock*, llvm::Value*>, std::__1::pair<llvm::BasicBlock*, llvm::Value*> >&) + 28756
7  clang                    0x00000001106054ea llvm::verifyFunction(llvm::Function const&, llvm::raw_ostream*) + 3850
8  clang                    0x0000000110632d92 void std::__1::vector<std::__1::pair<llvm::Instruction*, llvm::TerminatorInst*>, std::__1::allocator<std::__1::pair<llvm::Instruction*, llvm::TerminatorInst*> > >::__push_back_slow_path<std::__1::pair<llvm::Instruction*, llvm::TerminatorInst*> >(std::__1::pair<llvm::Instruction*, llvm::TerminatorInst*>&&) + 16450
9  clang                    0x00000001105b7bcd llvm::FPPassManager::runOnFunction(llvm::Function&) + 573
10 clang                    0x00000001105b7e2b llvm::FPPassManager::runOnModule(llvm::Module&) + 43
11 clang                    0x00000001105b8360 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 960
12 clang                    0x0000000110c4f478 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, llvm::raw_pwrite_stream*) + 11704
13 clang                    0x0000000110c4c7d6 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, llvm::raw_pwrite_stream*) + 278
14 clang                    0x0000000110e40329 clang::EmitObjAction::EmitObjAction(llvm::LLVMContext*) + 1545
15 clang                    0x000000011109a9ec clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) + 44
16 clang                    0x000000011166ee25 clang::ParseAST(clang::Sema&, bool, bool) + 581
17 clang                    0x000000011105f7a9 clang::FrontendAction::Execute() + 73
18 clang                    0x0000000111021aa1 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1089
19 clang                    0x00000001110b9eb1 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4449
20 clang                    0x000000010f627b27 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 1223
21 clang                    0x000000010f626159 main + 10473
22 clang                    0x000000010f623804 start + 52
23 clang                    0x0000000000000133 start + 4036872547
Stack dump:
0.	Program arguments: /Users/dmazzoni/src/gitchrome2/src/third_party/llvm-build/Release+Asserts/bin/clang -cc1 -triple x86_64-apple-macosx10.7.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -disable-free -main-file-name ImageDocument.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -relaxed-aliasing -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 253.3 -dwarf-column-info -debug-info-kind=standalone -dwarf-version=2 -debugger-tuning=lldb -coverage-file /Users/dmazzoni/src/gitchrome2/src/out/Release/obj/third_party/WebKit/Source/core/html/webcore_shared.ImageDocument.o -resource-dir /Users/dmazzoni/src/gitchrome2/src/third_party/llvm-build/Release+Asserts/bin/../lib/clang/3.9.0 -dependency-file obj/third_party/WebKit/Source/core/html/webcore_shared.ImageDocument.o.d -MT obj/third_party/WebKit/Source/core/html/webcore_shared.ImageDocument.o -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -include-pch obj/third_party/WebKit/Source/build/mac/webcore_shared.Prefix.h-cc.gch -D V8_DEPRECATION_WARNINGS -D __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -D CHROMIUM_BUILD -D CR_CLANG_REVISION=268813-1 -D COMPONENT_BUILD -D USE_LIBJPEG_TURBO=1 -D ENABLE_WEBRTC=1 -D ENABLE_MEDIA_ROUTER=1 -D ENABLE_PEPPER_CDMS -D ENABLE_NOTIFICATIONS -D ENABLE_TOPCHROME_MD=1 -D DCHECK_ALWAYS_ON=1 -D FIELDTRIAL_TESTING_ENABLED -D ENABLE_TASK_MANAGER=1 -D ENABLE_EXTENSIONS=1 -D ENABLE_PDF=1 -D ENABLE_PLUGIN_INSTALLATION=1 -D ENABLE_PLUGINS=1 -D ENABLE_SESSION_SERVICE=1 -D ENABLE_THEMES=1 -D ENABLE_PRINTING=1 -D ENABLE_BASIC_PRINTING=1 -D ENABLE_PRINT_PREVIEW=1 -D ENABLE_SPELLCHECK=1 -D USE_BROWSER_SPELLCHECKER=1 -D ENABLE_CAPTIVE_PORTAL_DETECTION=1 -D ENABLE_APP_LIST=1 -D ENABLE_SETTINGS_APP=1 -D ENABLE_SUPERVISED_USERS=1 -D ENABLE_SERVICE_DISCOVERY=1 -D V8_USE_EXTERNAL_STARTUP_DATA -D FULL_SAFE_BROWSING -D SAFE_BROWSING_CSD -D SAFE_BROWSING_DB_LOCAL -D BLINK_CORE_IMPLEMENTATION=1 -D BLINK_IMPLEMENTATION=1 -D INSIDE_BLINK -D MOJO_USE_SYSTEM_IMPL -D CHROME_PNG_WRITE_SUPPORT -D PNG_USER_CONFIG -D ENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0 -D ENABLE_OILPAN=1 -D WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1 -D WTF_USE_ICCJPEG=1 -D WTF_USE_QCMSLIB=1 -D U_USING_ICU_NAMESPACE=0 -D U_ENABLE_DYLOAD=0 -D U_NOEXCEPT= -D SKIA_DLL -D GR_GL_IGNORE_ES3_MSAA=0 -D SK_SUPPORT_GPU=1 -D SK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -D LIBXML_STATIC -D LIBXSLT_STATIC -D V8_SHARED -D USING_V8_SHARED -D USE_LIBPCI=1 -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D NDEBUG -D NVALGRIND -D DYNAMIC_ANNOTATIONS_ENABLED=0 -D _FORTIFY_SOURCE=2 -I gen -I ../../third_party/WebKit/Source -I gen/blink -I ../../third_party/WebKit -I ../../third_party/WebKit/Source/core/testing -I ../../third_party/WebKit/Source/core/testing/v8 -I ../.. -I ../../skia/config -I ../../third_party/khronos -I ../../gpu -I gen/angle -I ../../third_party/angle/include -I gen/third_party/WebKit -I ../../third_party/iccjpeg -I ../../third_party/libpng -I ../../third_party/libwebp -I ../../third_party/ots/include -I ../../third_party/zlib -I ../../third_party/libjpeg_turbo -I ../../third_party/icu/source/i18n -I ../../third_party/icu/source/common -I ../../skia/ext -I ../../third_party/skia/include/core -I ../../third_party/skia/include/effects -I ../../third_party/skia/include/pdf -I ../../third_party/skia/include/gpu -I ../../third_party/skia/include/lazy -I ../../third_party/skia/include/pathops -I ../../third_party/skia/include/pipe -I ../../third_party/skia/include/ports -I ../../third_party/skia/include/utils -I ../../third_party/skia/include/utils/mac -I ../../third_party/libxml/mac/include -I ../../third_party/libxml/src/include -I ../../third_party/libxslt -I ../../third_party/qcms/src -I ../../third_party/snappy/mac -I ../../third_party/snappy/src -I ../../v8/include -stdlib=libc++ -O2 -Werror -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wglobal-constructors -Wexit-time-destructors -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/dmazzoni/src/gitchrome2/src/out/Release -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -fvisibility-inlines-hidden -stack-protector 1 -fblocks -fno-rtti -fno-threadsafe-statics -fobjc-runtime=macosx-10.7.0 -fencode-extended-block-signature -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -load /Users/dmazzoni/src/gitchrome2/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -add-plugin find-bad-constructs -plugin-arg-find-bad-constructs check-templates -plugin-arg-find-bad-constructs follow-macro-expansion -plugin-arg-find-bad-constructs check-implicit-copy-ctors -load /Users/dmazzoni/src/gitchrome2/src/third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.dylib -add-plugin blink-gc-plugin -o obj/third_party/WebKit/Source/core/html/webcore_shared.ImageDocument.o -x c++ ../../third_party/WebKit/Source/core/html/ImageDocument.cpp 
1.	<eof> parser at end of file
2.	Code generation
3.	Running pass 'Function Pass Manager' on module '../../third_party/WebKit/Source/core/html/ImageDocument.cpp'.
4.	Running pass 'Module Verifier' on function '@_ZN3WTF10Partitions10fastMallocEmPKc'
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.9.0 (trunk 268813)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /Users/dmazzoni/src/gitchrome2/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/j1/lnrk_9p55fq583sp6mmjndlr000n66/T/ImageDocument-834773.cpp
clang: note: diagnostic msg: /var/folders/j1/lnrk_9p55fq583sp6mmjndlr000n66/T/ImageDocument-834773.sh
clang: note: diagnostic msg: 

********************
 
Owner: thakis@chromium.org
Status: Assigned (was: Untriaged)
@thakis, would it be helpful to have the preprocessed source and run script?

Is there a component for toolchain bugs?
Cc: h...@chromium.org
Labels: Build Clang
Yes, please attach it and she file requested by the output.

Do you have local changes? Which config are you building (gyp defines / gn args)? Is there a compile error above the stack? Which is are you on? Is this deterministic -- if you build the same file again, does this happen again? Which revision are you synced to?
I'll attach it the next time this happens.

Config: gyp (waiting for component build to switch to gn)
Compile error: no, this happens on a clean trunk build

This has been happening for a week. No local changes.

It is NOT deterministic, recompiling again always succeeds. It rarely happens during incremental builds.

There's definitely a chance this is a hardware issue, I'll try running memtest.

Comment 4 by thakis@chromium.org, May 10 2016

Do you use goma? What are your GYP_DEFINES? How do you run gyp? How do you build?
I don't use goma on this machine.

GYP_DEFINES: mac_strip_release=0 dcheck_always_on=1 component=shared_library

I ran gyp using build/gyp_chromium, or implicitly due to gclient sync.

Build command line was:
ninja -C out/Release -j 10 chrome

Cc: dominicc@chromium.org
In my experience failures like this are hardware related. Run memtest86? I have a cursed machine that fails in this way and reducing the build parallelism a bit seems to help.

Sign in to add a comment