Open
Description
Problem
Hi there --
I've encountered a regression in Cargo 1.88 in a situation where if:
- a lot of Cargo builds are run in parallel in a workspace
- one of the crates has a build script that does its own Cargo build
Then cargo build
can nondeterministically hang. Cargo 1.87 does not have this bug.
A minimized reproduction is at https://github.com/nextest-rs/test-cargo-stress. On my 16c/32t Ryzen 7950x this bug reproduces within a couple of seconds.
I did a bisect of Rust nightlies and found that the regression occurred between nightly-2025-04-28 and nightly-2025-04-29.
% cargo +nightly-2025-04-28 -V
cargo 1.88.0-nightly (d811228b1 2025-04-15)
% cargo +nightly-2025-04-29 -V
cargo 1.88.0-nightly (7918c7eb5 2025-04-27)
The range of Cargo commits is https://github.com/rust-lang/cargo/compare/d811228b1..7918c7eb5.
(This was originally nextest-rs/nextest#2463.)
Steps
- Clone https://github.com/nextest-rs/test-cargo-stress and cd into it
cargo run
Possible Solution(s)
No response
Notes
The bug does not appear to be OS-specific. I've seen reproductions on Linux, Windows and illumos.
Version
% cargo -v -V
cargo 1.88.0 (873a06493 2025-05-10)
release: 1.88.0
commit-hash: 873a0649350c486caf67be772828a4f36bb4734c
commit-date: 2025-05-10
host: x86_64-unknown-linux-gnu
libgit2: 1.9.0 (sys:0.20.0 vendored)
libcurl: 8.12.1-DEV (sys:0.4.80+curl-8.12.1 vendored ssl:OpenSSL/3.4.1)
ssl: OpenSSL 3.4.1 11 Feb 2025
os: Ubuntu 24.4.0 (noble) [64-bit]
Metadata
Metadata
Assignees
Labels
Type
Projects
Status