Bug 2275090 - clang hangs in findUnwindDestinations(llvm::FunctionLoweringInfo&, llvm::BasicBlock const*, llvm::BranchProbability, llvm::SmallVectorImpl<std::pair<llvm::MachineBasicBlock*, llvm::BranchProbability> >&) ()
Summary: clang hangs in findUnwindDestinations(llvm::FunctionLoweringInfo&, llvm::Basi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: clang
Version: 40
Hardware: ppc64le
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Nikita Popov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PPCTracker
TreeView+ depends on / blocked
 
Reported: 2024-04-15 10:26 UTC by Jonathan S.
Modified: 2024-07-16 18:07 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-05-15 01:26:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jonathan S. 2024-04-15 10:26:05 UTC
When trying to build packages on ppc64le, clang hangs in `findUnwindDestinations(llvm::FunctionLoweringInfo&, llvm::BasicBlock const*, llvm::BranchProbability, llvm::SmallVectorImpl<std::pair<llvm::MachineBasicBlock*, llvm::BranchProbability> >&) ()`. I have several clang processes being stuck in this now. It doesn't seem to be the same files that hang.

This prevents packages from updating, e.g. for months it was impossible to update objfw on rawhide. This has now crept into f40 and blocks all further updates there, too.

Reproducible: Always

Steps to Reproduce:
1. git clone https://src.fedoraproject.org/rpms/objfw.git
2. cd objfw && git checkout f40
3. fedpkg mockbuild
Actual Results:  
Several clang processes hang in `findUnwindDestinations(llvm::FunctionLoweringInfo&, llvm::BasicBlock const*, llvm::BranchProbability, llvm::SmallVectorImpl<std::pair<llvm::MachineBasicBlock*, llvm::BranchProbability> >&) ()`, spinning and taking all CPU they can.

Expected Results:  
Clang eventually produces a .o file

Comment 1 Nikita Popov 2024-04-16 02:59:03 UTC
Here is the post-optimization IR for one of the hanging processes: https://gist.github.com/nikic/e0ce63cbac47af52652545f96162c7eb

Running this through llc (from main) triggers an assertion failure:

> llc: /home/nikic/repos/llvm-project/llvm/lib/CodeGen/Analysis.cpp:191: GlobalValue *llvm::ExtractTypeInfo(Value *): Assertion `(GV || isa<ConstantPointerNull>(V)) && "TypeInfo must be a global variable or NULL"' failed.

Comment 2 Nikita Popov 2024-04-16 05:20:57 UTC
Upstream issue with a reduced test case: https://github.com/llvm/llvm-project/issues/88844

Comment 3 Jonathan S. 2024-05-12 14:01:49 UTC
Since there is a fix now, can this please be included in the clang builds used on Koji? This is preventing the objfw package from being updated on rawhide, and on F40 it is only being updated for all archs but PowerPC (PowerPC was dropped from the spec file so that it reverts back to what is in F40 rather than F40 updates, to unblock the other archs).

This has yet again blocked another objfw release for rawhide right now.

Comment 4 Tom Stellard 2024-05-14 02:02:58 UTC
Rawhide PR: https://src.fedoraproject.org/rpms/llvm/pull-request/202

Comment 5 Fedora Update System 2024-05-14 23:54:40 UTC
FEDORA-2024-a489f23401 (llvm-18.1.4-2.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-a489f23401

Comment 6 Fedora Update System 2024-05-15 01:26:09 UTC
FEDORA-2024-a489f23401 (llvm-18.1.4-2.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2024-07-08 17:56:47 UTC
FEDORA-2024-ddb3244c43 (llvm18-18.1.7-2.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-ddb3244c43

Comment 8 Fedora Update System 2024-07-16 18:07:57 UTC
FEDORA-2024-d0c1af678f (llvm18-18.1.7-3.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-d0c1af678f


Note You need to log in before you can comment on or make changes to this bug.