Open matevy opened 3 months ago
Same host, but FC40 and LLVM 18.1.8 fails on even more tests:
Failed Tests (5): LLVM :: tools/dsymutil/X86/DWARFLinkerParallel/odr-fwd-declaration2.test LLVM :: tools/dsymutil/X86/DWARFLinkerParallel/odr-fwd-declaration3.test LLVM :: tools/dsymutil/X86/DWARFLinkerParallel/odr-predictable-output2.test LLVM :: tools/dsymutil/X86/DWARFLinkerParallel/odr-string.test LLVM :: tools/dsymutil/X86/DWARFLinkerParallel/odr-uniquing.cpp
llvm-18.1.8 build fail FC40.txt
@llvm/issue-subscribers-backend-powerpc
Author: None (matevy)
Thanks for reporting this issue. I suspect this is caused by https://github.com/llvm/llvm-project/pull/68721
It would be great if you can share more info about where the crash happens inside function CompileUnit::allocateTypeDie(llvm::dwarf_linker::parallel::TypeEntryBody*
. @matevy
Any thoughts for this crash inside docker? @avl-llvm
can you give me instructions how to collect more info?
can you give me instructions how to collect more info?
For example, build a debug version LLVM, when the crash happens, it should tell you the line number in the GDB's trace back table.
debug versions itself fails even before testing, other erros.
but if I reproduce this specific problem, I get the following backtrace
(gdb) run Starting program: /root/llvm-project/build/bin/dsymutil --linker=parallel -f -o /root/llvm-project/build/test/tools/dsymutil/X86/DWARFLinkerParallel/Output/odr-predictable-output2.test.tmp1.o -oso-prepend-path=/root/llvm-project/llvm/test/tools/dsymutil/X86/DWARFLinkerParallel/../ -y /root/llvm-project/llvm/test/tools/dsymutil/X86/DWARFLinkerParallel/odr-predictable-output2.test
This GDB supports auto-downloading debuginfo from the following URLs:
https://debuginfod.fedoraproject.org/
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
Downloading separate debug info for /lib64/libz.so.1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff75bf0c0 (LWP 633158)]
[New Thread 0x7ffff6daf0c0 (LWP 633159)]
[New Thread 0x7ffff659f0c0 (LWP 633160)]
[New Thread 0x7ffff5d8f0c0 (LWP 633161)]
[New Thread 0x7ffff557f0c0 (LWP 633162)]
[New Thread 0x7ffff4d6f0c0 (LWP 633163)]
[New Thread 0x7fffefdef0c0 (LWP 633164)]
[New Thread 0x7fffef5df0c0 (LWP 633165)]
[New Thread 0x7fffeedcf0c0 (LWP 633166)]
[New Thread 0x7fffee5bf0c0 (LWP 633167)]
[New Thread 0x7fffeddaf0c0 (LWP 633168)]
[New Thread 0x7fffed59f0c0 (LWP 633169)]
[New Thread 0x7fffecd8f0c0 (LWP 633170)]
[New Thread 0x7fffec57f0c0 (LWP 633171)]
[New Thread 0x7fffebd6f0c0 (LWP 633172)]
[New Thread 0x7fffeb55f0c0 (LWP 633173)]
[New Thread 0x7fffead4f0c0 (LWP 633174)]
[New Thread 0x7fffea53f0c0 (LWP 633175)]
[New Thread 0x7fffe9d2f0c0 (LWP 633176)]
[New Thread 0x7fffe951f0c0 (LWP 633177)]
[New Thread 0x7fffe8d0f0c0 (LWP 633178)]
[New Thread 0x7fffe84ff0c0 (LWP 633179)]
[New Thread 0x7fffe7cef0c0 (LWP 633180)]
[New Thread 0x7fffe74df0c0 (LWP 633181)]
[New Thread 0x7fffe6ccf0c0 (LWP 633182)]
[New Thread 0x7fffe64bf0c0 (LWP 633183)]
[New Thread 0x7fffe5caf0c0 (LWP 633184)]
[New Thread 0x7fffe549f0c0 (LWP 633185)]
[New Thread 0x7fffe4c8f0c0 (LWP 633186)]
[New Thread 0x7fffe447f0c0 (LWP 633187)]
[New Thread 0x7fffe3c6f0c0 (LWP 633188)]
[New Thread 0x7fffe345f0c0 (LWP 633189)]
[New Thread 0x7fffe2c4f0c0 (LWP 633190)]
[New Thread 0x7fffe243f0c0 (LWP 633191)]
[New Thread 0x7fffe1c2f0c0 (LWP 633192)]
[New Thread 0x7fffe141f0c0 (LWP 633193)]
[New Thread 0x7fffe0c0f0c0 (LWP 633194)]
[New Thread 0x7fffe03ff0c0 (LWP 633195)]
[New Thread 0x7fffdfbef0c0 (LWP 633196)]
[New Thread 0x7fffdf3df0c0 (LWP 633197)]
[New Thread 0x7fffdebcf0c0 (LWP 633198)]
[New Thread 0x7fffde3bf0c0 (LWP 633199)]
[New Thread 0x7fffddbaf0c0 (LWP 633200)]
[New Thread 0x7fffdd39f0c0 (LWP 633201)]
[New Thread 0x7fffdcb8f0c0 (LWP 633202)]
[New Thread 0x7fffdc37f0c0 (LWP 633203)]
[New Thread 0x7fffdbb6f0c0 (LWP 633204)]
[New Thread 0x7fffdb35f0c0 (LWP 633205)]
[New Thread 0x7fffdab4f0c0 (LWP 633206)]
[New Thread 0x7fffda33f0c0 (LWP 633207)]
[New Thread 0x7fffd9b2f0c0 (LWP 633208)]
[New Thread 0x7fffd931f0c0 (LWP 633209)]
[New Thread 0x7fffd8b0f0c0 (LWP 633210)]
[New Thread 0x7fffd82ff0c0 (LWP 633211)]
[New Thread 0x7fffd7aef0c0 (LWP 633212)]
[New Thread 0x7fffd72df0c0 (LWP 633213)]
[New Thread 0x7fffd6acf0c0 (LWP 633214)]
[New Thread 0x7fffd62bf0c0 (LWP 633215)]
[New Thread 0x7fffd5aaf0c0 (LWP 633216)]
[New Thread 0x7fffd529f0c0 (LWP 633217)]
[New Thread 0x7fffd4a8f0c0 (LWP 633218)]
[New Thread 0x7fffd427f0c0 (LWP 633219)]
[New Thread 0x7fffd3a6f0c0 (LWP 633220)]
[New Thread 0x7fffd325f0c0 (LWP 633221)]
[New Thread 0x7fffd2a4f0c0 (LWP 633222)]
[New Thread 0x7fffd223f0c0 (LWP 633223)]
[New Thread 0x7fffd1a2f0c0 (LWP 633224)]
warning: /root/llvm-project/llvm/test/tools/dsymutil/X86/DWARFLinkerParallel/../Inputs/String/foo1.o: timestamp mismatch between object file (2024-07-31 11:01:17.[New Thread 0x7fffd121f0c0 (LWP 633225)]
636477297) and debug map (2021-12-07 19:18:39.000000000)
[New Thread 0x7fffd0a0f0c0 (LWP 633226)]
[New Thread 0x7fffd01ff0c0 (LWP 633227)]
[New Thread 0x7fffcf9ef0c0 (LWP 633228)]
[New Thread 0x7fffcf1df0c0 (LWP 633229)]
[New Thread 0x7fffce9cf0c0 (LWP 633230)]
warning: /root/llvm-project/llvm/test/tools/dsymutil/X86/DWARFLinkerParallel/../Inputs/String/foo2.o: timestamp mismatch between object file (2024-07-31 11:01:17.636477297) and debug map (2021-12-07 19:18:43.000000000)
[New Thread 0x7fffce1bf0c0 (LWP 633231)]
[New Thread 0x7fffcd9af0c0 (LWP 633232)]
[New Thread 0x7fffcd19f0c0 (LWP 633233)]
[New Thread 0x7fffcc98f0c0 (LWP 633234)]
warning: /root/llvm-project/llvm/test/tools/dsymutil/X86/DWARFLinkerParallel/../Inputs/String/foo3.o: timestamp mismatch between object file (2024-07-31 11:01:17.636477297) and debug map (2021-12-07 19:18:47.000000000)
[New Thread 0x7fffcc17f0c0 (LWP 633235)]
[New Thread 0x7fffcb96f0c0 (LWP 633236)]
[New Thread 0x7fffcb15f0c0 (LWP 633237)]
warning: /root/llvm-project/llvm/test/tools/dsymutil/X86/DWARFLinkerParallel/../Inputs/String/main.o: timestamp mismatch between object file (2024-07-31 11:01:17.636477297) and debug map (2021-12-07 19:18:54.000000000)
[New Thread 0x7fffca94f0c0 (LWP 633238)]
[New Thread 0x7fffca13f0c0 (LWP 633239)]
[New Thread 0x7fffc992f0c0 (LWP 633240)]
[New Thread 0x7fffc911f0c0 (LWP 633241)]
dsymutil: /root/llvm-project/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp:1480: llvm::dwarf_linker::parallel::TypeEntry llvm::dwarf_linker::parallel::CompileUnit::createTypeDIEandCloneAttributes(const llvm::DWARFDebugInfoEntry, llvm::dwarf_linker::parallel::DIEGenerator&, llvm::dwarf_linker::parallel::TypeEntry, llvm::dwarf_linker::parallel::TypeUnit): Assertion `EntryBody' failed.
Thread 4 "dsymutil" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff659f0c0 (LWP 633160)]
0x00007ffff767418c in pthread_kill_implementation (threadid=
(gdb) backtrace
assertion=assertion@entry=0x190f27d8 "EntryBody",
file=file@entry=0x190f1d48 "/root/llvm-project/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp", line=line@entry=1480,
function=function@entry=0x190f2688 "llvm::dwarf_linker::parallel::TypeEntry* llvm::dwarf_linker::parallel::CompileUnit::createTypeDIEandCloneAttributes(const llvm::DWARFDebugInfoEntry*, llvm::dwarf_linker::parallel::DIEGenerator&, llvm:"...) at assert.c:92
file=0x190f1d48 "/root/llvm-project/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp", line=1480,
function=0x190f2688 "llvm::dwarf_linker::parallel::TypeEntry* llvm::dwarf_linker::parallel::CompileUnit::createTypeDIEandCloneAttributes(const llvm::DWARFDebugInfoEntry*, llvm::dwarf_linker::parallel::DIEGenerator&, llvm:"...) at assert.c:101
InputDieEntry=0x1ba5e188, TypeDIEGenerator=..., ClonedParentTypeDIE=0x7fffa802faf0, ArtificialTypeUnit=0x7fffc4000b70)
at /root/llvm-project/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp:1480
ClonedParentTypeDIE=0x7fffa802faf0, OutOffset=49, FuncAddressAdjustment=std::optional [no contained value],
VarAddressAdjustment=std::optional [no contained value], Allocator=..., ArtificialTypeUnit=0x7fffc4000b70)
at /root/llvm-project/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp:1317
ClonedParentTypeDIE=0x7fffa800bc38, OutOffset=49, FuncAddressAdjustment=std::optional [no contained value],
VarAddressAdjustment=std::optional [no contained value], Allocator=..., ArtificialTypeUnit=0x7fffc4000b70)
at /root/llvm-project/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp:1338
ClonedParentTypeDIE=0x7fffa800bc18, OutOffset=49, FuncAddressAdjustment=std::optional [no contained value],
VarAddressAdjustment=std::optional [no contained value], Allocator=..., ArtificialTypeUnit=0x7fffc4000b70)
at /root/llvm-project/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp:1338
ClonedParentTypeDIE=0x7fffa800bc00, OutOffset=49, FuncAddressAdjustment=std::optional [no contained value],
VarAddressAdjustment=std::optional [no contained value], Allocator=..., ArtificialTypeUnit=0x7fffc4000b70)
at /root/llvm-project/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp:1338
ClonedParentTypeDIE=0x7fffc4282ed0, OutOffset=49, FuncAddressAdjustment=std::optional [no contained value],
VarAddressAdjustment=std::optional [no contained value], Allocator=..., ArtificialTypeUnit=0x7fffc4000b70)
at /root/llvm-project/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp:1338
ClonedParentTypeDIE=0x7fffc4282ed0, OutOffset=49, FuncAddressAdjustment=std::optional [no contained value],
VarAddressAdjustment=std::optional [no contained value], Allocator=..., ArtificialTypeUnit=0x7fffc4000b70)
at /root/llvm-project/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp:1338
ArtificialTypeUnit=0x7fffc4000b70) at /root/llvm-project/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp:1246
--Type
at /root/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68
MaxCounter=100000) at /root/llvm-project/llvm/include/llvm/DWARFLinker/Utils.h:30
ArtificialTypeUnit=0x7fffc4000b70, DoUntilStage=llvm::dwarf_linker::parallel::CompileUnit::Stage::Cleaned)
at /root/llvm-project/llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.cpp:704
at /root/llvm-project/llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.cpp:500
at /root/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45
at /root/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68
__fn=...) at /usr/include/c++/13/bits/invoke.h:111
at /root/llvm-project/llvm/lib/Support/Parallel.cpp:141
dPoolStrategy)::<lambda()>::<lambda()> >(std::__invoke_other, struct {...} &&) (__f=...) at /usr/include/c++/13/bits/invoke.h:61
at /usr/include/c++/13/bits/std_thread.h:292
at /usr/include/c++/13/bits/std_thread.h:244
if I try to build LLVM 18.1.7 or 18.1.7 on FC39 inside docker container (host is Power8 ppc64le Ubuntu 22.04) it fails during testing:
`[663/664] Running the LLVM regression tests FAIL: LLVM :: tools/dsymutil/X86/DWARFLinkerParallel/odr-predictable-output2.test (46252 of 53310) **** TEST 'LLVM :: tools/dsymutil/X86/DWARFLinkerParallel/odr-predictable-output2.test' FAILED **** Exit Code: 139
Command Output (stderr):
RUN: at line 1: /root/llvm-project/build/bin/dsymutil --linker=parallel -f -o /root/llvm-project/build/test/tools/dsymutil/X86/DWARFLinkerParallel/Output/odr-predictable-output2.test.tmp1.o -oso-prepend-path=/root/llvm-project/llvm/test/tools/dsymutil/X86/DWARFLinkerParallel/../ -y /root/llvm-project/llvm/test/tools/dsymutil/X86/DWARFLinkerParallel/odr-predictable-output2.test
--
FAIL: LLVM :: tools/dsymutil/X86/DWARFLinkerParallel/odr-string.test (46475 of 53310) **** TEST 'LLVM :: tools/dsymutil/X86/DWARFLinkerParallel/odr-string.test' FAILED **** Exit Code: 2
Command Output (stderr):
RUN: at line 1: /root/llvm-project/build/bin/dsymutil --linker=parallel -f -o - -oso-prepend-path=/root/llvm-project/llvm/test/tools/dsymutil/X86/DWARFLinkerParallel/../ -y /root/llvm-project/llvm/test/tools/dsymutil/X86/DWARFLinkerParallel/odr-string.test | /root/llvm-project/build/bin/llvm-dwarfdump --verify - | /root/llvm-project/build/bin/FileCheck -check-prefixes=VERIFY /root/llvm-project/llvm/test/tools/dsymutil/X86/DWARFLinkerParallel/odr-string.test
0 0x00000000127f2d80 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/root/llvm-project/build/bin/dsymutil+0x127f2d80)
1 0x00000000127eff8c SignalHandler(int) Signals.cpp:0:0
2 0x00007c73f7d60444 (linux-vdso64.so.1+0x444)
3 0x0000000012473e0c llvm::dwarf_linker::parallel::CompileUnit::allocateTypeDie(llvm::dwarf_linker::parallel::TypeEntryBody*, llvm::dwarf_linker::parallel::DIEGenerator&, llvm::dwarf::Tag, bool, bool) (/root/llvm-project/build/bin/dsymutil+0x12473e0c)
4 0x00000000124744b8 llvm::dwarf_linker::parallel::CompileUnit::createTypeDIEandCloneAttributes(llvm::DWARFDebugInfoEntry const, llvm::dwarf_linker::parallel::DIEGenerator&, llvm::StringMapEntry<std::atomic<llvm::dwarf_linker::parallel::TypeEntryBody>>, llvm::dwarf_linker::parallel::TypeUnit) (/root/llvm-project/build/bin/dsymutil+0x124744b8)
5 0x0000000012474e80 llvm::dwarf_linker::parallel::CompileUnit::cloneDIE(llvm::DWARFDebugInfoEntry const, llvm::StringMapEntry<std::atomic<llvm::dwarf_linker::parallel::TypeEntryBody>>, unsigned long, std::optional, std::optional, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul, 128ul>&, llvm::dwarf_linker::parallel::TypeUnit ) (/root/llvm-project/build/bin/dsymutil+0x12474e80)
6 0x0000000012474f28 llvm::dwarf_linker::parallel::CompileUnit::cloneDIE(llvm::DWARFDebugInfoEntry const, llvm::StringMapEntry<std::atomic<llvm::dwarf_linker::parallel::TypeEntryBody>>, unsigned long, std::optional, std::optional, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul, 128ul>&, llvm::dwarf_linker::parallel::TypeUnit ) (/root/llvm-project/build/bin/dsymutil+0x12474f28)
7 0x0000000012474f28 llvm::dwarf_linker::parallel::CompileUnit::cloneDIE(llvm::DWARFDebugInfoEntry const, llvm::StringMapEntry<std::atomic<llvm::dwarf_linker::parallel::TypeEntryBody>>, unsigned long, std::optional, std::optional, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul, 128ul>&, llvm::dwarf_linker::parallel::TypeUnit ) (/root/llvm-project/build/bin/dsymutil+0x12474f28)
8 0x0000000012474f28 llvm::dwarf_linker::parallel::CompileUnit::cloneDIE(llvm::DWARFDebugInfoEntry const, llvm::StringMapEntry<std::atomic<llvm::dwarf_linker::parallel::TypeEntryBody>>, unsigned long, std::optional, std::optional, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul, 128ul>&, llvm::dwarf_linker::parallel::TypeUnit ) (/root/llvm-project/build/bin/dsymutil+0x12474f28)
9 0x0000000012474f28 llvm::dwarf_linker::parallel::CompileUnit::cloneDIE(llvm::DWARFDebugInfoEntry const, llvm::StringMapEntry<std::atomic<llvm::dwarf_linker::parallel::TypeEntryBody>>, unsigned long, std::optional, std::optional, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul, 128ul>&, llvm::dwarf_linker::parallel::TypeUnit ) (/root/llvm-project/build/bin/dsymutil+0x12474f28)
10 0x0000000012480644 llvm::dwarf_linker::parallel::CompileUnit::cloneAndEmit(std::optional<std::reference_wrapper>, llvm::dwarf_linker::parallel::TypeUnit*) (/root/llvm-project/build/bin/dsymutil+0x12480644)
11 0x000000001246215c llvm::dwarf_linker::parallel::DWARFLinkerImpl::LinkContext::linkSingleCompileUnit(llvm::dwarf_linker::parallel::CompileUnit&, llvm::dwarf_linker::parallel::TypeUnit*, llvm::dwarf_linker::parallel::CompileUnit::Stage) (/root/llvm-project/build/bin/dsymutil+0x1246215c)
12 0x0000000012752d8c std::_Function_handler<void (), llvm::parallelFor(unsigned long, unsigned long, llvm::function_ref<void (unsigned long)>)::'lambda0'()>::_M_invoke(std::_Any_data const&) Parallel.cpp:0:0 #13 0x0000000012753280 std::_Function_handler<void (), llvm::parallel::TaskGroup::spawn(std::function<void ()>, bool)::'lambda'()>::_M_invoke(std::_Any_data const&) Parallel.cpp:0:0 #14 0x0000000012753e04 std::thread::_State_impl<std::thread::_Invoker<std::tuple<llvm::parallel::detail::(anonymous namespace)::ThreadPoolExecutor::ThreadPoolExecutor(llvm::ThreadPoolStrategy)::'lambda'()::operator()() const::'lambda'()>>>::_M_run() Parallel.cpp:0:0 #15 0x00007c73f7941330 (/lib64/libstdc++.so.6+0x161330)
16 0x00007c73f7471524 start_thread (/lib64/libc.so.6+0xb1524)
error: -: The file was not recognized as a valid object file FileCheck error: '' is empty.
FileCheck command line: /root/llvm-project/build/bin/FileCheck /root/llvm-project/llvm/test/tools/dsymutil/X86/DWARFLinkerParallel/odr-string.test
--
Failed Tests (2): LLVM :: tools/dsymutil/X86/DWARFLinkerParallel/odr-predictable-output2.test LLVM :: tools/dsymutil/X86/DWARFLinkerParallel/odr-string.test
Testing Time: 877.44s
Total Discovered Tests: 58174 Skipped : 64 (0.11%) Unsupported : 2060 (3.54%) Passed : 55892 (96.08%) Expectedly Failed: 156 (0.27%) Failed : 2 (0.00%) FAILED: test/CMakeFiles/check-llvm /root/llvm-project/build/test/CMakeFiles/check-llvm cd /root/llvm-project/build/test && /usr/bin/python3.12 /root/llvm-project/build/./bin/llvm-lit -sv /root/llvm-project/build/test ninja: build stopped: subcommand failed.`
compiling on host itself on Ubuntu 22.04 does not fail. Using exactly the same Dockerfile on Ubuntu 22.04 x86_64 host it also builds fine.
Some of previous versions of LLVM (16.x for sure) built find in the same environment.