BPF List
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: "Brendan Jackman" <jackmanb@google.com>,
	"Björn Töpel" <bjorn.topel@gmail.com>
Cc: brouer@redhat.com, BPF-dev-list <bpf@vger.kernel.org>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Daniel Borkmann <borkmann@iogearbox.net>,
	Veronika Kabatova <vkabatov@redhat.com>,
	Yauheni Kaliuta <yauheni.kaliuta@redhat.com>,
	Stanislav Kozina <skozina@redhat.com>
Subject: Issues compiling selftests XADD - "Invalid usage of the XADD return value"
Date: Mon, 18 Jan 2021 14:41:01 +0100	[thread overview]
Message-ID: <20210118144101.01a5d410@carbon> (raw)

Hi All,

After rebasing (my MTU patchset) to bpf-next (232164e041e925a) I'm
getting this error when compiling selftests (full error below signature):

  "CLNG-BPF [test_maps] atomics.o"
  "fatal error: error in backend: line 27: Invalid usage of the XADD return value"
  "PLEASE submit a bug report to https://bugs.llvm.org/ [...]"

It looked like a LLVM bug, so I compiled llvm-11.1.0-rc1, but it still fails.

I noticed Brendan Jackman changes... could this be related?

- - 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

 dirs
 ~/git/kernel/bpf-next/tools/testing/selftests/bpf

  CLNG-BPF [test_maps] atomics.o
fatal error: error in backend: line 27: Invalid usage of the XADD return value
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /usr/local/bin/clang -g -mlittle-endian -Wno-compare-distinct-pointer-types -O2 -target bpf -mcpu=v3 -fcolor-diagnostics -D__TARGET_ARCH_x86 -I/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/tools/include -I/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf -I/home/jbrouer/git/kernel/bpf-next/tools/include/uapi -I/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/usr/include -idirafter /usr/local/include -idirafter /usr/local/stow/llvm-11.1.0-rc1-git-9bbcb554cdbf/lib/clang/11.1.0/include -idirafter /usr/include -DENABLE_ATOMICS_TESTS -c -o /home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/atomics.o progs/atomics.c 
1.	<eof> parser at end of file
2.	Code generation
3.	Running pass 'Function Pass Manager' on module 'progs/atomics.c'.
4.	Running pass 'BPF PreEmit Checking' on function '@add'
 #0 0x0000000001969e8a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/local/bin/clang+0x1969e8a)
 #1 0x0000000001967f84 llvm::sys::RunSignalHandlers() (/usr/local/bin/clang+0x1967f84)
 #2 0x0000000001968478 llvm::sys::CleanupOnSignal(unsigned long) (/usr/local/bin/clang+0x1968478)
 #3 0x00000000018f2b34 llvm::CrashRecoveryContext::HandleExit(int) (/usr/local/bin/clang+0x18f2b34)
 #4 0x0000000001961ea7 llvm::sys::Process::Exit(int) (/usr/local/bin/clang+0x1961ea7)
 #5 0x000000000095ca03 LLVMErrorHandler(void*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) (/usr/local/bin/clang+0x95ca03)
 #6 0x00000000018f7ca5 llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/local/bin/clang+0x18f7ca5)
 #7 0x00000000018f7dfe (/usr/local/bin/clang+0x18f7dfe)
 #8 0x000000000096d5d1 (anonymous namespace)::BPFMIPreEmitChecking::runOnMachineFunction(llvm::MachineFunction&) (/usr/local/bin/clang+0x96d5d1)
 #9 0x0000000000f68484 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/local/bin/clang+0xf68484)
#10 0x0000000001348a68 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/local/bin/clang+0x1348a68)
#11 0x00000000013490e3 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/local/bin/clang+0x13490e3)
#12 0x0000000001347dc3 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/local/bin/clang+0x1347dc3)
#13 0x0000000001bd2514 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/usr/local/bin/clang+0x1bd2514)
#14 0x0000000001bd32d1 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> >) (/usr/local/bin/clang+0x1bd32d1)
#15 0x00000000027798ce clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/local/bin/clang+0x27798ce)
#16 0x00000000032c7449 clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/bin/clang+0x32c7449)
#17 0x0000000002176081 clang::FrontendAction::Execute() (/usr/local/bin/clang+0x2176081)
#18 0x000000000212e21b clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/bin/clang+0x212e21b)
#19 0x00000000022307a0 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/bin/clang+0x22307a0)
#20 0x000000000095d153 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/local/bin/clang+0x95d153)
#21 0x000000000095b03b ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/usr/local/bin/clang+0x95b03b)
#22 0x0000000002011215 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::'lambda'()>(long) (/usr/local/bin/clang+0x2011215)
#23 0x00000000018f29c3 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/local/bin/clang+0x18f29c3)
#24 0x0000000002011c71 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (.part.0) (/usr/local/bin/clang+0x2011c71)
#25 0x0000000001fe9d21 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/usr/local/bin/clang+0x1fe9d21)
#26 0x0000000001fea54d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/usr/local/bin/clang+0x1fea54d)
#27 0x0000000001ff571f clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/usr/local/bin/clang+0x1ff571f)
#28 0x00000000008ee422 main (/usr/local/bin/clang+0x8ee422)
#29 0x00007f2417f0b1a3 __libc_start_main (/lib64/libc.so.6+0x271a3)
#30 0x000000000095abee _start (/usr/local/bin/clang+0x95abee)
make: *** [Makefile:417: /home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/atomics.o] Error 1


             reply	other threads:[~2021-01-18 13:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18 13:41 Jesper Dangaard Brouer [this message]
2021-01-18 13:47 ` Issues compiling selftests XADD - "Invalid usage of the XADD return value" Brendan Jackman
2021-01-18 14:24   ` Björn Töpel
2021-01-18 14:37   ` Jesper Dangaard Brouer
2021-01-18 15:24     ` Brendan Jackman
2021-01-18 16:33       ` Jesper Dangaard Brouer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210118144101.01a5d410@carbon \
    --to=brouer@redhat.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=bjorn.topel@gmail.com \
    --cc=borkmann@iogearbox.net \
    --cc=bpf@vger.kernel.org \
    --cc=jackmanb@google.com \
    --cc=skozina@redhat.com \
    --cc=vkabatov@redhat.com \
    --cc=yauheni.kaliuta@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox