In my recent attempt to recollect updated Chrome build data on Mac, chrome starts to fail to build (both out/Release and out/Debug) with additional throughput data collection switch “-ftime-report” due to multiple occurrence of assertion below:
Assertion failed: (!Running && "Cannot start a running timer"), function startTimer, file /Users/thakis/src/chrome/src/third_party/llvm/lib/Support/Timer.cpp, line 139.
Chrome build.ninja (with additional switches), build failure logs, and automatically created standalone repros are attached/pasted below. Note this only repros with “-ftime-report” switch set – chrome builds successfully on Mac without modifications on build.ninja. But I need that switch to collect throughput data.
For some reason, the assertion didn’t repro when I ran those automatically created repro scripts in their folder /var/folders/8z/77mjhj5j6592xmd2_wq53wrw0000gn/T/. It might because it is some timing sensitive bug - like perhaps the compiler can't create a timer if there are too many other compilers running in parallel?
Modified build commands (in build.ninja file), and one occurrence of that assertion in Chrome build log are pasted below:
../../sdch/open-vcdiff/src/addrcache.cc:34:11: LLVM IR generation of declaration 'open_vcdiff'
../../sdch/open-vcdiff/src/addrcache.cc:46:21: Generating code for declaration 'open_vcdiff::VCDiffAddressCache::VCDiffAddressCache'
/Users/peptest/tp/chromium/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/type_traits:460:27: LLVM IR generation of declaration 'std::__1::integral_constant::operator type-parameter-0-0'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.9.0 (trunk 257955)
Target: x86_64-apple-darwin15.0.0
Thread model: posix
InstalledDir: /Users/peptest/tp/chromium/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/8z/77mjhj5j6592xmd2_wq53wrw0000gn/T/addrcache-91f433.cpp
clang: note: diagnostic msg: /var/folders/8z/77mjhj5j6592xmd2_wq53wrw0000gn/T/addrcache-91f433.sh
clang: note: diagnostic msg:
Extended Description
In my recent attempt to recollect updated Chrome build data on Mac, chrome starts to fail to build (both out/Release and out/Debug) with additional throughput data collection switch “-ftime-report” due to multiple occurrence of assertion below:
Assertion failed: (!Running && "Cannot start a running timer"), function startTimer, file /Users/thakis/src/chrome/src/third_party/llvm/lib/Support/Timer.cpp, line 139.
Chrome build.ninja (with additional switches), build failure logs, and automatically created standalone repros are attached/pasted below. Note this only repros with “-ftime-report” switch set – chrome builds successfully on Mac without modifications on build.ninja. But I need that switch to collect throughput data.
For some reason, the assertion didn’t repro when I ran those automatically created repro scripts in their folder /var/folders/8z/77mjhj5j6592xmd2_wq53wrw0000gn/T/. It might because it is some timing sensitive bug - like perhaps the compiler can't create a timer if there are too many other compilers running in parallel?
Modified build commands (in build.ninja file), and one occurrence of that assertion in Chrome build log are pasted below:
Additional switch added to build.ninja (full file attached): rule cc command = $cc -MMD -MF $out.d $defines $includes $cflags $cflags_c -ftime-report $cflags_pch_c -c $in -o $out description = CC $out depfile = $out.d deps = gcc rule cc_s command = $cc $defines $includes $cflags $cflags_c -ftime-report $cflags_pch_c -c $in -o $out description = CC $out rule cxx command = $cxx -MMD -MF $out.d $defines $includes $cflags $cflags_cc -ftime-report $cflags_pch_cc -c $in -o $out description = CXX $out depfile = $out.d deps = gcc rule objc command = $cc -MMD -MF $out.d $defines $includes $cflags $cflags_objc -ftime-report $cflags_pch_objc -c $in -o $out description = OBJC $out depfile = $out.d deps = gcc rule objcxx command = $cxx -MMD -MF $out.d $defines $includes $cflags $cflags_objcc -ftime-report $cflags_pch_objcc -c $in -o $out description = OBJCXX $out depfile = $out.d deps = gcc
Failure part of build log (full log is too large to be attached) [7349/20094] CXX obj/sdch/open-vcdiff/src/sdch.codetable.o [7350/20094] CXX obj/sdch/open-vcdiff/src/sdch.decodetable.o FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/sdch/open-vcdiff/src/sdch.addrcache.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=257955-1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DDONT_EMBED_BUILD_METADATA -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_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=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 -DOPEN_VCDIFF_USE_AUTO_PTR -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../../sdch/open-vcdiff/src -I../../sdch/mac -I../.. -I../../third_party/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -O2 -gdwarf-2 -fvisibility=hidden -Werror -mmacosx-version-min=10.6 -arch x86_64 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wfor-loop-analysis -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 -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /Users/peptest/tp/chromium/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 -fcolor-diagnostics -fno-strict-aliasing -ftime-report -include obj/sdch/sdch.logging_forward.h-cc -c ../../sdch/open-vcdiff/src/addrcache.cc -o obj/sdch/open-vcdiff/src/sdch.addrcache.o Assertion failed: (!Running && "Cannot start a running timer"), function startTimer, file /Users/thakis/src/chrome/src/third_party/llvm/lib/Support/Timer.cpp, line 139. 0 clang 0x000000010138957b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43 1 clang 0x0000000101388786 llvm::sys::RunSignalHandlers() + 70 2 clang 0x0000000101389e61 void* llvm::object_creator<std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std:: 1::allocator<std::1::basic_string<char, std::__1::char_traits, std:: 1::allocator > > > >() + 929
3 libsystem_platform.dylib 0x00007fff9680452a _sigtramp + 26
4 clang 0x0000000103903a6e clang::Stmt::StatisticsEnabled + 29945
5 clang 0x0000000101389aa6 abort + 22
6 clang 0x0000000101389a81 assert_rtn + 81
7 clang 0x000000010134ae9c llvm::Timer::startTimer() + 108
8 clang 0x000000010170fe15 clang::EmitObjAction::EmitObjAction(llvm::LLVMContext) + 533
9 clang 0x000000010195f14c clang::MultiplexConsumer::HandleInterestingDecl(clang::DeclGroupRef) + 44
10 clang 0x0000000101fa7c2b clang::ASTReader::PassInterestingDeclsToConsumer() + 251
11 clang 0x0000000101fb282f clang::ASTReader::FinishedDeserializing() + 799
12 clang 0x0000000102944bf7 clang::DeclContext::LoadLexicalDeclsFromExternalStorage() const + 407
13 clang 0x0000000102945947 clang::DeclContext::decls_begin() const + 23
14 clang 0x00000001015d74ec clang::CodeGen::CGDebugInfo::CollectRecordFields(clang::RecordDecl const, llvm::DIFile, llvm::SmallVectorImpl<llvm::Metadata>&, llvm::DICompositeType) + 124
15 clang 0x00000001015daad1 clang::CodeGen::CGDebugInfo::CreateTypeDefinition(clang::RecordType const) + 513
16 clang 0x00000001015d2f4f clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 79
17 clang 0x00000001015d64dc clang::CodeGen::CGDebugInfo::CreateType(clang::TypedefType const, llvm::DIFile) + 60
18 clang 0x00000001015d2f4f clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 79
19 clang 0x00000001015d6792 clang::CodeGen::CGDebugInfo::CreateType(clang::FunctionType const, llvm::DIFile) + 258
20 clang 0x00000001015d2f4f clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 79
21 clang 0x00000001015d77d7 clang::CodeGen::CGDebugInfo::getOrCreateMethodType(clang::CXXMethodDecl const, llvm::DIFile) + 87
22 clang 0x00000001015d7eb6 clang::CodeGen::CGDebugInfo::CreateCXXMemberFunction(clang::CXXMethodDecl const, llvm::DIFile, llvm::DIType) + 86
23 clang 0x00000001015d86a4 clang::CodeGen::CGDebugInfo::CollectCXXMemberFunctions(clang::CXXRecordDecl const, llvm::DIFile, llvm::SmallVectorImpl<llvm::Metadata>&, llvm::DIType) + 388
24 clang 0x00000001015daae9 clang::CodeGen::CGDebugInfo::CreateTypeDefinition(clang::RecordType const) + 537
25 clang 0x00000001015d2f4f clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 79
26 clang 0x00000001015d2bb8 clang::CodeGen::CGDebugInfo::getContextDescriptor(clang::Decl const, llvm::DIScope) + 312
27 clang 0x00000001015d65fd clang::CodeGen::CGDebugInfo::CreateType(clang::TypedefType const, llvm::DIFile) + 349
28 clang 0x00000001015d2f4f clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 79
29 clang 0x00000001015d64dc clang::CodeGen::CGDebugInfo::CreateType(clang::TypedefType const, llvm::DIFile) + 60
30 clang 0x00000001015d2f4f clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 79
31 clang 0x00000001015d6911 clang::CodeGen::CGDebugInfo::createFieldType(llvm::StringRef, clang::QualType, unsigned long long, clang::SourceLocation, clang::AccessSpecifier, unsigned long long, llvm::DIFile, llvm::DIScope, clang::RecordDecl const) + 49
32 clang 0x00000001015d7388 clang::CodeGen::CGDebugInfo::CollectRecordNormalField(clang::FieldDecl const, unsigned long long, llvm::DIFile, llvm::SmallVectorImpl<llvm::Metadata>&, llvm::DIType, clang::RecordDecl const) + 392
33 clang 0x00000001015d763c clang::CodeGen::CGDebugInfo::CollectRecordFields(clang::RecordDecl const, llvm::DIFile, llvm::SmallVectorImpl<llvm::Metadata>&, llvm::DICompositeType) + 460
34 clang 0x00000001015daad1 clang::CodeGen::CGDebugInfo::CreateTypeDefinition(clang::RecordType const) + 513
35 clang 0x00000001015d2f4f clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 79
36 clang 0x00000001015d89a2 clang::CodeGen::CGDebugInfo::CollectCXXBases(clang::CXXRecordDecl const, llvm::DIFile, llvm::SmallVectorImpl<llvm::Metadata>&, llvm::DIType) + 642
37 clang 0x00000001015daaa8 clang::CodeGen::CGDebugInfo::CreateTypeDefinition(clang::RecordType const) + 472
38 clang 0x00000001015d2f4f clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 79
39 clang 0x00000001015d6911 clang::CodeGen::CGDebugInfo::createFieldType(llvm::StringRef, clang::QualType, unsigned long long, clang::SourceLocation, clang::AccessSpecifier, unsigned long long, llvm::DIFile, llvm::DIScope, clang::RecordDecl const) + 49
40 clang 0x00000001015d7388 clang::CodeGen::CGDebugInfo::CollectRecordNormalField(clang::FieldDecl const, unsigned long long, llvm::DIFile, llvm::SmallVectorImpl<llvm::Metadata>&, llvm::DIType, clang::RecordDecl const) + 392
41 clang 0x00000001015d763c clang::CodeGen::CGDebugInfo::CollectRecordFields(clang::RecordDecl const, llvm::DIFile, llvm::SmallVectorImpl<llvm::Metadata>&, llvm::DICompositeType) + 460
42 clang 0x00000001015daad1 clang::CodeGen::CGDebugInfo::CreateTypeDefinition(clang::RecordType const) + 513
43 clang 0x00000001015d2f4f clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 79
44 clang 0x0000000101725349 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue) + 249
45 clang 0x000000010177ea51 clang::CodeGen::CreateItaniumCXXABI(clang::CodeGen::CodeGenModule&) + 27473
46 clang 0x000000010172eeab clang::CodeGen::CodeGenModule::EmitNamespace(clang::NamespaceDecl const) + 91
47 clang 0x00000001017a670f clang::CreateLLVMCodeGen(clang::DiagnosticsEngine&, std::1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, clang::HeaderSearchOptions const&, clang::PreprocessorOptions const&, clang::CodeGenOptions const&, llvm::LLVMContext&, clang::CoverageSourceInfo) + 1151
48 clang 0x000000010170fe25 clang::EmitObjAction::EmitObjAction(llvm::LLVMContext) + 549
49 clang 0x000000010195f060 clang::MultiplexConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 48
50 clang 0x0000000101ec2eb2 clang::ParseAST(clang::Sema&, bool, bool) + 482
51 clang 0x0000000101925636 clang::FrontendAction::Execute() + 54
52 clang 0x00000001018e9cb1 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1089
53 clang 0x000000010197e6df clang::ExecuteCompilerInvocation(clang::CompilerInstance) + 4127
54 clang 0x00000001000068b3 cc1_main(llvm::ArrayRef<char const>, char const, void) + 1363
55 clang 0x0000000100005263 main + 11667
56 clang 0x0000000100002464 start + 52
57 clang 0x00000000000000c6 start + 4294958230
Stack dump:
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/8z/77mjhj5j6592xmd2_wq53wrw0000gn/T/addrcache-91f433.cpp clang: note: diagnostic msg: /var/folders/8z/77mjhj5j6592xmd2_wq53wrw0000gn/T/addrcache-91f433.sh clang: note: diagnostic msg: