Bug 2226564
Summary: | llc optional: Assertion 'this->_M_is_engaged()' failed. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Josh Stone <jistone> | ||||||||
Component: | llvm | Assignee: | Tom Stellard <tstellar> | ||||||||
Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 39 | CC: | dmalcolm, jakub, jchecahi, jistone, kkleine, npopov, scottt.tw, serge.guelton, siddharth.kde, tbaeder, tstellar, tuliom | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | Type: | --- | |||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
Josh Stone
2023-07-26 00:34:48 UTC
Created attachment 1979987 [details]
reduced.bc
Here's a fuller backtrace from GDB: (gdb) bt #0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44 #1 0x00007ffff04b08b3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78 #2 0x00007ffff045fabe in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #3 0x00007ffff044887f in __GI_abort () at abort.c:79 #4 0x00007ffff06df1e0 in std::__glibcxx_assert_fail (file=<optimized out>, line=<optimized out>, function=<optimized out>, condition=<optimized out>) at ../../../../../libstdc++-v3/src/c++11/debug.cc:61 #5 0x00007ffff20b256c in llvm::DbgVariable::getFrameIndexExprs() const::$_0::operator()(llvm::DbgVariable::FrameIndexExpr const&, llvm::DbgVariable::FrameIndexExpr const&) const (A=..., B=..., this=<optimized out>) at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/predefined_ops.h:158 #6 __gnu_cxx::__ops::_Iter_comp_iter<llvm::DbgVariable::getFrameIndexExprs() const::$_0>::operator()<llvm::DbgVariable::FrameIndexExpr*, llvm::DbgVariable::FrameIndexExpr*>(llvm::DbgVariable::FrameIndexExpr*, llvm::DbgVariable::FrameIndexExpr*) ( this=<optimized out>, __it1=<optimized out>, __it2=<optimized out>) at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/predefined_ops.h:158 #7 0x00007ffff20b28b6 in std::__insertion_sort<llvm::DbgVariable::FrameIndexExpr*, __gnu_cxx::__ops::_Iter_comp_iter<llvm::DbgVariable::getFrameIndexExprs() const::$_0> >(llvm::DbgVariable::FrameIndexExpr*, llvm::DbgVariable::FrameIndexExpr*, __gnu_cxx::__ops::_Iter_comp_iter<llvm::DbgVariable::getFrameIndexExprs() const::$_0>) (__first=0x5cb490, __last=0x5cb4b0, __comp=...) at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_algo.h:1819 #8 0x00007ffff2096e61 in std::__final_insertion_sort<llvm::DbgVariable::FrameIndexExpr*, __gnu_cxx::__ops::_Iter_comp_iter<llvm::DbgVariable::getFrameIndexExprs() const::$_0> >(llvm::DbgVariable::FrameIndexExpr*, llvm::DbgVariable::FrameIndexExpr*, __gnu_cxx::__ops::_Iter_comp_iter<llvm::DbgVariable::getFrameIndexExprs() const::$_0>) (__first=0x5cb490, __last=0x5cb4b0, __comp=...) at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_algo.h:1864 #9 std::__sort<llvm::DbgVariable::FrameIndexExpr*, __gnu_cxx::__ops::_Iter_comp_iter<llvm::DbgVariable::getFrameIndexExprs() const::$_0> >(llvm::DbgVariable::FrameIndexExpr*, llvm::DbgVariable::FrameIndexExpr*, __gnu_cxx::__ops::_Iter_comp_iter<llvm::DbgVariable::getFrameIndexExprs() const::$_0>) (__first=0x5cb490, __last=0x5cb4b0, __comp=...) at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_algo.h:1950 #10 std::sort<llvm::DbgVariable::FrameIndexExpr*, llvm::DbgVariable::getFrameIndexExprs() const::$_0>(llvm::DbgVariable::FrameIndexExpr*, llvm::DbgVariable::FrameIndexExpr*, llvm::DbgVariable::getFrameIndexExprs() const::$_0) (__first=0x5cb490, __last=0x5cb4b0, __comp=...) at /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_algo.h:4894 #11 llvm::sort<llvm::DbgVariable::FrameIndexExpr*, llvm::DbgVariable::getFrameIndexExprs() const::$_0>(llvm::DbgVariable::FrameIndexExpr*, llvm::DbgVariable::FrameIndexExpr*, llvm::DbgVariable::getFrameIndexExprs() const::$_0) (Start=0x5cb490, End=0x5cb4b0, Comp=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/include/llvm/ADT/STLExtras.h:1705 #12 llvm::sort<llvm::SmallVector<llvm::DbgVariable::FrameIndexExpr, 1u>&, llvm::DbgVariable::getFrameIndexExprs() const::$_0>(llvm::SmallVector<llvm::DbgVariable::FrameIndexExpr, 1u>&, llvm::DbgVariable::getFrameIndexExprs() const::$_0) (C=..., Comp=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/include/llvm/ADT/STLExtras.h:1710 #13 llvm::DbgVariable::getFrameIndexExprs (this=0x5cd630) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:282 #14 0x00007ffff2090136 in llvm::DwarfCompileUnit::constructVariableDIEImpl (this=0x5339a0, DV=..., Abstract=<optimized out>) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:853 #15 0x00007ffff208f032 in llvm::DwarfCompileUnit::constructVariableDIE (this=0x5339a0, DV=..., Abstract=<optimized out>) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:706 #16 llvm::DwarfCompileUnit::constructVariableDIE (this=0x5339a0, DV=..., Scope=..., ObjectPointer=<optimized out>) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:911 #17 llvm::DwarfCompileUnit::createAndAddScopeChildren (this=0x5339a0, Scope=0x5cbca8, ScopeDIE=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:1063 #18 0x00007ffff208d731 in llvm::DwarfCompileUnit::constructScopeDIE (this=0x195333, Scope=0x195333, ParentScopeDIE=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/include/llvm/CodeGen/DIE.h:540 #19 0x00007ffff208f340 in llvm::DwarfCompileUnit::createAndAddScopeChildren (this=0x5339a0, Scope=<optimized out>, ScopeDIE=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:1091 #20 0x00007ffff208f4ae in llvm::DwarfCompileUnit::createAndAddScopeChildren (this=0x5339a0, Scope=<optimized out>, ScopeDIE=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:1093 #21 0x00007ffff208f4ae in llvm::DwarfCompileUnit::createAndAddScopeChildren (this=0x5339a0, Scope=<optimized out>, ScopeDIE=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:1093 #22 0x00007ffff208d731 in llvm::DwarfCompileUnit::constructScopeDIE (this=0x195333, Scope=0x195333, ParentScopeDIE=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/include/llvm/CodeGen/DIE.h:540 #23 0x00007ffff208f340 in llvm::DwarfCompileUnit::createAndAddScopeChildren (this=0x5339a0, Scope=<optimized out>, ScopeDIE=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:1091 #24 0x00007ffff20913b3 in llvm::DwarfCompileUnit::constructSubprogramScopeDIE (this=0x5339a0, Sub=0x44c140, Scope=0x5cba10) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:1032 #25 0x00007ffff20a4cdb in llvm::DwarfDebug::endFunctionImpl (this=0x531dc0, MF=0x596180) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2296 #26 0x00007ffff20819c6 in llvm::DebugHandlerBase::endFunction (this=0x531dc0, MF=0x596180) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp:410 #27 0x00007ffff206a117 in llvm::AsmPrinter::emitFunctionBody (this=0x4f7680) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1842 #28 0x00007ffff45f5665 in llvm::X86AsmPrinter::runOnMachineFunction (this=0x4f7680, MF=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/Target/X86/X86AsmPrinter.cpp:86 #29 0x00007ffff1adf53c in llvm::MachineFunctionPass::runOnFunction (this=0x4f7680, F=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/CodeGen/MachineFunctionPass.cpp:91 #30 0x00007ffff18335ae in llvm::FPPassManager::runOnFunction (this=0x4cfdd0, F=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/IR/LegacyPassManager.cpp:1430 #31 0x00007ffff183a303 in llvm::FPPassManager::runOnModule (this=0x4cfdd0, M=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/IR/LegacyPassManager.cpp:1476 #32 0x00007ffff1833d2a in (anonymous namespace)::MPPassManager::runOnModule (this=0x4cdf20, M=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/IR/LegacyPassManager.cpp:1545 #33 llvm::legacy::PassManagerImpl::run (this=0x4b21b0, M=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/lib/IR/LegacyPassManager.cpp:535 #34 0x000000000041096a in compileModule (argv=<optimized out>, Context=...) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/tools/llc/llc.cpp:733 #35 main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/llvm-16.0.6-1.fc38.x86_64/tools/llc/llc.cpp:420 I've filed https://github.com/llvm/llvm-project/issues/64149 with a slightly reduced test case. Created attachment 1980333 [details]
original reproducer
Do you also have the cargo-50f78329f19490ae.cargo.c1756bb5859f0146-cgu.10.rcgu.no-opt.bc file? I'd like to check whether the issue already exists in the input IR or only appears after optimization. (The rust srpm would also work, it looks like the original copr link expired.) Created attachment 1980523 [details]
original no-opt reproducer
I attached the no-opt, and uploaded the srpm here: https://jistone.fedorapeople.org/bz2226564/rust-1.71.0-2.fc39.src.rpm That verrel is not correct -- it's really a 1.73-nightly inside. If you build it in mock, it needs --enable-network to download beta stage0. This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle. Changing version to 39. This problem has now appeared in a scratch build of rust-1.72.0~beta.11: https://koji.fedoraproject.org/koji/taskinfo?taskID=105099384 |