rust-lang / rust-lang/rust

Some creates hang when building with opt-level=3

Open
#145,527 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug I-compiletime S-needs-info S-needs-repro T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Hello,

Soru is using the crate async-stripe as a dependency in her project. For rustc, she is using 1.91.0-nightly. When compiling the crate async-stripe it seems to hang indefinitely, a single CPU pegged to 100%. Total waiting time tried out is over 14 hours.

Now, if soru overrides the opt-level for that single package to be 2

[profile.release.package.async-stripe]
opt-level = 2

the crate will indeed compile in a couple of minutes.

In 1.89.0-nightly this issue did not exist yet. No idea if it does in between, as soru never tried those.

Meta

rustc --version --verbose:

rustc 1.91.0-nightly (2e2642e64 2025-08-16)
binary: rustc
commit-hash: 2e2642e641a941f0a1400c7827fd89aa86fef8f4
commit-date: 2025-08-16
host: x86_64-unknown-linux-gnu
release: 1.91.0-nightly
LLVM version: 21.1.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the hang while compiling the async-stripe crate with rustc 1.91.0-nightly and opt-level=3, then compare it with opt-level=2 and 1.89.0-nightly. The payload names no Rust source files or tests; done means identifying the regression and adding an appropriate regression test or confirmed fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.