Skip to content

Some creates hang when building with opt-level=3 #145527

@Sorunome

Description

@Sorunome

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-compiletimeIssue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions