x86_64-nacl-clang++ crash

41 views
Skip to first unread message

Marat Dukhan

unread,
Feb 10, 2016, 10:23:43 PM2/10/16
to Native-Client-Discuss
I encountered the following crash in x86_64-nacl-clang++ (both pepper_47 and pepper_canary toolchains):

FAILED: /home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/x86_64-nacl-clang++ -o /home/marat/NNPACK/build/test/fft-ref.cc.o -c /home/marat/NNPACK/test/fft-ref.cc -MMD -MF /home/marat/NNPACK/build/test/fft-ref.cc.o.d -O3 -g -std=gnu++11 -pthread -I/home/marat/NNPACK/include -I/home/marat/NNPACK/third-party/pthreadpool/include -I/home/marat/NNPACK/test -I/home/marat/NNPACK/third-party/gtest-1.7.0/include
x86_64-nacl-clang++: /mnt/data/b/build/slave/nacl-toolchain/build/native_client/toolchain_build/src/llvm/lib/Target/X86/X86NaClRewritePass.cpp:570: bool (anonymous namespace)::X86NaClRewritePass::ApplyMemorySFI(llvm::MachineBasicBlock &, MachineBasicBlock::iterator): Assertion `!IndexReg.getReg() && "Unexpected index and base register"' failed.
#0 0x7f4c3db7ec48 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/../lib/libLLVM-3.7svn.so+0x141fc48)
#1 0x7f4c3db8051b SignalHandler(int) (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/../lib/libLLVM-3.7svn.so+0x142151b)
#2 0x7f4c3c551d10 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10d10)
#3 0x7f4c3b48e267 gsignal /build/buildd/glibc-2.21/signal/../sysdeps/unix/sysv/linux/raise.c:55:0
#4 0x7f4c3b48feca abort /build/buildd/glibc-2.21/stdlib/abort.c:91:0
#5 0x7f4c3b48703d __assert_fail_base /build/buildd/glibc-2.21/assert/assert.c:92:0
#6 0x7f4c3b4870f2 (/lib/x86_64-linux-gnu/libc.so.6+0x2e0f2)
#7 0x7f4c3ddc991b (anonymous namespace)::X86NaClRewritePass::runOnMachineBasicBlock(llvm::MachineBasicBlock&) (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/../lib/libLLVM-3.7svn.so+0x166a91b)
#8 0x7f4c3ddc62db (anonymous namespace)::X86NaClRewritePass::runOnMachineFunction(llvm::MachineFunction&) (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/../lib/libLLVM-3.7svn.so+0x16672db)
#9 0x7f4c3d079c09 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/../lib/libLLVM-3.7svn.so+0x91ac09)
#10 0x7f4c3d2da224 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/../lib/libLLVM-3.7svn.so+0xb7b224)
#11 0x7f4c3d2da45b llvm::FPPassManager::runOnModule(llvm::Module&) (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/../lib/libLLVM-3.7svn.so+0xb7b45b)
#12 0x7f4c3d2da9bc llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/../lib/libLLVM-3.7svn.so+0xb7b9bc)
#13 0x884851 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_pwrite_stream*) (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/x86_64-nacl-clang+++0x884851)
#14 0x8766c7 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/x86_64-nacl-clang+++0x8766c7)
#15 0xac3ee3 clang::ParseAST(clang::Sema&, bool, bool) (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/x86_64-nacl-clang+++0xac3ee3)
#16 0x639bde clang::FrontendAction::Execute() (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/x86_64-nacl-clang+++0x639bde)
#17 0x60d32b clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/x86_64-nacl-clang+++0x60d32b)
#18 0x5f0631 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/x86_64-nacl-clang+++0x5f0631)
#19 0x5e803e cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/x86_64-nacl-clang+++0x5e803e)
#20 0x5eebd7 main (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/x86_64-nacl-clang+++0x5eebd7)
#21 0x7f4c3b479a40 __libc_start_main /build/buildd/glibc-2.21/csu/libc-start.c:323:0
#22 0x5e7cf5 _start (/home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/x86_64-nacl-clang+++0x5e7cf5)
Stack dump:
0. Program arguments: /home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/x86_64-nacl-clang++ -cc1 -triple x86_64--nacl -S -disable-free -main-file-name fft-ref.cc -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -no-integrated-as -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version 2.22 -g -dwarf-column-info -coverage-file /home/marat/NNPACK/build/test/fft-ref.cc.o -resource-dir /home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/../lib/clang/3.7.0 -dependency-file /home/marat/NNPACK/build/test/fft-ref.cc.o.d -MT /home/marat/NNPACK/build/test/fft-ref.cc.o -I /home/marat/NNPACK/include -I /home/marat/NNPACK/third-party/pthreadpool/include -I /home/marat/NNPACK/test -I /home/marat/NNPACK/third-party/gtest-1.7.0/include -internal-isystem /home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/../x86_64-nacl/include/c++/v1 -internal-isystem /home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/../lib/clang/3.7.0/include -internal-isystem /home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/../x86_64-nacl/usr/include -internal-isystem /home/marat/Tools/nacl_sdk/pepper_canary/toolchain/linux_pnacl/bin/../x86_64-nacl/include -O3 -std=gnu++11 -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir /home/marat/NNPACK -ferror-limit 19 -fmessage-length 0 -pthread -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o /tmp/fft-ref-546346.s -x c++ /home/marat/NNPACK/test/fft-ref.cc
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '/home/marat/NNPACK/test/fft-ref.cc'.
4. Running pass 'NaCl Rewrites' on function '@_ZN26ForwardAndInverseFFTTester4testIPFvPKfPfES5_EEvT_T0_'
x86_64-nacl-clang++: error: unable to execute command: Aborted (core dumped)
x86_64-nacl-clang++: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.7.0 (https://chromium.googlesource.com/a/native_client/pnacl-clang.git cf0dc7f6e6123dfa9b8834b56743315300b34e6c) (https://chromium.googlesource.com/a/native_client/pnacl-llvm.git 335826e8d5b5eff193edf6ac24b81e11f5b2ae08)
Target: x86_64--nacl
Thread model: posix
x86_64-nacl-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.
x86_64-nacl-clang++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
x86_64-nacl-clang++: note: diagnostic msg: /tmp/fft-ref-fddb85.cpp
x86_64-nacl-clang++: note: diagnostic msg: /tmp/fft-ref-fddb85.sh
x86_64-nacl-clang++: note: diagnostic msg:

********************

If needed, I can share the diagnostic files privately.

Regards,
Marat

Marat Dukhan

unread,
Feb 11, 2016, 2:16:16 PM2/11/16
to Native-Client-Discuss
Is anybody on the NaCl team looking into the problem? Any chance it will be fixed soon?

Regards,
Marat

Derek Schuff

unread,
Feb 11, 2016, 2:31:39 PM2/11/16
to Native-Client-Discuss
This doesn't ring a bell but if you can share the preprocessed source file that the compiler emits when it asserts, that would be helpful. (If you need to obfuscate it I can tell you how to get an IR file out that would probably work too).

--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to native-client-di...@googlegroups.com.
To post to this group, send email to native-cli...@googlegroups.com.
Visit this group at https://groups.google.com/group/native-client-discuss.
For more options, visit https://groups.google.com/d/optout.

Derek Schuff

unread,
Feb 11, 2016, 3:39:08 PM2/11/16
to Native-Client-Discuss
I filed https://bugs.chromium.org/p/nativeclient/issues/detail?id=4358 for anyone following along, I'll add updates there.

Marat Dukhan

unread,
Feb 11, 2016, 3:42:41 PM2/11/16
to native-cli...@googlegroups.com
Thank you!

You received this message because you are subscribed to a topic in the Google Groups "Native-Client-Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/native-client-discuss/84CuMU9ikuI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to native-client-di...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages