New issue
Advanced search Search tips

Issue 841170 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

ToT Clang build hits assert: !cast<MDNode>(MD)->getNumOperands() && "Expected an empty MDNode"

Project Member Reported by h...@chromium.org, May 9 2018

Issue description

Example build:
https://ci.chromium.org/buildbot/chromium.clang/ToTLinux/2441


Attaching repro. Stack from a local build:

clang++: ../lib/IR/IntrinsicInst.cpp:47: llvm::Value* llvm::DbgInfoIntrinsic::getVariableLocation(bool) const: Assertion `!cast<MDNode>(MD)->getNumOperands() && "Expected an empty MDNode"' failed.

Stack dump:
0.	Program arguments: ../../../../llvm/build.release/bin/clang++ -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name statistics_recorder.cc -mrelocation-model pic -pic-level 2 -mthread-model posix -fmerge-all-constants -mdisable-fp-elim -relaxed-aliasing -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -ggnu-pubnames -momit-leaf-frame-pointer -ffunction-sections -fdata-sections -coverage-notes-file /work/chromium/src/out/release/obj/base/base/statistics_recorder.gcno -nostdinc++ -resource-dir ../../../../llvm/build.release/lib/clang/7.0.0 -dependency-file obj/base/base/statistics_recorder.o.d -MT obj/base/base/statistics_recorder.o -isystem ../../build/linux/debian_sid_amd64-sysroot/usr/include/glib-2.0 -isystem ../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem ../../buildtools/third_party/libc++/trunk/include -isystem ../../buildtools/third_party/libc++abi/trunk/include -D USE_SYMBOLIZE -D V8_DEPRECATION_WARNINGS -D USE_UDEV -D USE_AURA=1 -D USE_GLIB=1 -D USE_NSS_CERTS=1 -D USE_X11=1 -D FULL_SAFE_BROWSING -D SAFE_BROWSING_CSD -D SAFE_BROWSING_DB_LOCAL -D CHROMIUM_BUILD -D FIELDTRIAL_TESTING_ENABLED -D _FILE_OFFSET_BITS=64 -D _LARGEFILE_SOURCE -D _LARGEFILE64_SOURCE -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D COMPONENT_BUILD -D CR_LIBCXX_REVISION=329375 -D CR_LIBCXXABI_REVISION=329629 -D CR_SYSROOT_HASH=4e7db513b0faeea8fb410f70c9909e8736f5c0ab -D NDEBUG -D NVALGRIND -D DYNAMIC_ANNOTATIONS_ENABLED=0 -D BASE_IMPLEMENTATION -D GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -D GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -I ../.. -I gen -D __DATE__= -D __TIME__= -D __TIMESTAMP__= -isysroot ../../build/linux/debian_sid_amd64-sysroot -internal-isystem ../../build/linux/debian_sid_amd64-sysroot/usr/local/include -internal-isystem ../../../../llvm/build.release/lib/clang/7.0.0/include -internal-externc-isystem ../../build/linux/debian_sid_amd64-sysroot/usr/include/x86_64-linux-gnu -internal-externc-isystem ../../build/linux/debian_sid_amd64-sysroot/include -internal-externc-isystem ../../build/linux/debian_sid_amd64-sysroot/usr/include -O2 -Wno-builtin-macro-redefined -Wall -Werror -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-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-ignored-pragma-optimize -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-char-subscripts -Wglobal-constructors -Wexit-time-destructors -Wexit-time-destructors -Wshadow -Wexit-time-destructors -std=gnu++14 -fdeprecated-macro -fdebug-compilation-dir /work/chromium/src/out/release -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -fvisibility-inlines-hidden -pthread -stack-protector 1 -stack-protector-buffer-size 4 -fno-rtti -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -mllvm -instcombine-lower-dbg-declare=0 -mllvm -fast-isel-sink-local-values=1 -o obj/base/base/statistics_recorder.o -x c++ ../../base/metrics/statistics_recorder.cc 
1.	<eof> parser at end of file
2.	Per-module optimization passes
3.	Running pass 'CallGraph Pass Manager' on module '../../base/metrics/statistics_recorder.cc'.
4.	Running pass 'Loop-Closed SSA Form Pass' on function '@_ZNSt3__16__sortIRPFbPKN4base13HistogramBaseES4_EPPS2_EEvT0_SA_T_'
#0 0x000055bafd6f6baa llvm::sys::PrintStackTrace(llvm::raw_ostream&) (../../../../llvm/build.release/bin/clang+++0x24b1baa)
#1 0x000055bafd6f48e6 llvm::sys::RunSignalHandlers() (../../../../llvm/build.release/bin/clang+++0x24af8e6)
#2 0x000055bafd6f4c55 SignalHandler(int) (../../../../llvm/build.release/bin/clang+++0x24afc55)
#3 0x00007f564580d0c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)
#4 0x00007f564439efcf gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x32fcf)
#5 0x00007f56443a03fa abort (/lib/x86_64-linux-gnu/libc.so.6+0x343fa)
#6 0x00007f5644397e37 (/lib/x86_64-linux-gnu/libc.so.6+0x2be37)
#7 0x00007f5644397ee2 (/lib/x86_64-linux-gnu/libc.so.6+0x2bee2)
#8 0x000055bafd1a7a29 (../../../../llvm/build.release/bin/clang+++0x1f62a29)
#9 0x000055bafd7729b1 llvm::insertDebugValuesForPHIs(llvm::BasicBlock*, llvm::SmallVectorImpl<llvm::PHINode*>&) (../../../../llvm/build.release/bin/clang+++0x252d9b1)
#10 0x000055bafd75a37f llvm::formLCSSAForInstructions(llvm::SmallVectorImpl<llvm::Instruction*>&, llvm::DominatorTree&, llvm::LoopInfo&) (../../../../llvm/build.release/bin/clang+++0x251537f)
#11 0x000055bafd75c1b6 llvm::formLCSSA(llvm::Loop&, llvm::DominatorTree&, llvm::LoopInfo*, llvm::ScalarEvolution*) (../../../../llvm/build.release/bin/clang+++0x25171b6)
#12 0x000055bafd75d458 llvm::formLCSSARecursively(llvm::Loop&, llvm::DominatorTree&, llvm::LoopInfo*, llvm::ScalarEvolution*) (../../../../llvm/build.release/bin/clang+++0x2518458)
#13 0x000055bafd75d43d llvm::formLCSSARecursively(llvm::Loop&, llvm::DominatorTree&, llvm::LoopInfo*, llvm::ScalarEvolution*) (../../../../llvm/build.release/bin/clang+++0x251843d)
#14 0x000055bafd75d605 (anonymous namespace)::LCSSAWrapperPass::runOnFunction(llvm::Function&) (../../../../llvm/build.release/bin/clang+++0x2518605)
#15 0x000055bafd1c3ac9 llvm::FPPassManager::runOnFunction(llvm::Function&) (../../../../llvm/build.release/bin/clang+++0x1f7eac9)
#16 0x000055bafcbcf0b1 (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) (../../../../llvm/build.release/bin/clang+++0x198a0b1)
#17 0x000055bafd1c3211 llvm::legacy::PassManagerImpl::run(llvm::Module&) (../../../../llvm/build.release/bin/clang+++0x1f7e211)
#18 0x000055bafd8de52f (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (../../../../llvm/build.release/bin/clang+++0x269952f)
#19 0x000055bafd8e00a5 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (../../../../llvm/build.release/bin/clang+++0x269b0a5)
#20 0x000055bafe0630a8 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (../../../../llvm/build.release/bin/clang+++0x2e1e0a8)
#21 0x000055bafe831ee9 clang::ParseAST(clang::Sema&, bool, bool) (../../../../llvm/build.release/bin/clang+++0x35ecee9)
#22 0x000055bafe061e20 clang::CodeGenAction::ExecuteAction() (../../../../llvm/build.release/bin/clang+++0x2e1ce20)
#23 0x000055bafdd0128e clang::FrontendAction::Execute() (../../../../llvm/build.release/bin/clang+++0x2abc28e)
#24 0x000055bafdcc828e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (../../../../llvm/build.release/bin/clang+++0x2a8328e)
#25 0x000055bafdd9e4cb clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (../../../../llvm/build.release/bin/clang+++0x2b594cb)
#26 0x000055bafbe7e6d8 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (../../../../llvm/build.release/bin/clang+++0xc396d8)
#27 0x000055bafbdfe125 main (../../../../llvm/build.release/bin/clang+++0xbb9125)
#28 0x00007f564438c2b1 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b1)
#29 0x000055bafbe7b9ca _start (../../../../llvm/build.release/bin/clang+++0xc369ca)
clang++: error: unable to execute command: Aborted
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 7.0.0 (trunk 331845) (llvm/trunk 331853)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: ../../../../llvm/build.release/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: /tmp/statistics_recorder-99855c.cpp
clang++: note: diagnostic msg: /tmp/statistics_recorder-99855c.sh
clang++: note: diagnostic msg: 

********************
ninja: build stopped: subcommand failed.
 
statistics_recorder-99855c.cpp
5.2 MB View Download
statistics_recorder-99855c.sh
9.1 KB View Download

Comment 1 by h...@chromium.org, May 9 2018

Bisection points to r331843.

Comment 2 by h...@chromium.org, May 9 2018

Reverted in r331861. Let's see if things improve..

Comment 3 Deleted

Comment 4 by h...@chromium.org, May 9 2018

Status: Fixed (was: Started)
The bots are making progress now, e.g. https://ci.chromium.org/buildbot/chromium.clang/ToTLinux/2445

Sign in to add a comment