Skip to content

fix(publish): avoid false deadlock when to_confirm is non-empty#17071

Merged
epage merged 2 commits into
rust-lang:masterfrom
raushan728:fix/publish-workspace-deadlock-17028
Jun 10, 2026
Merged

fix(publish): avoid false deadlock when to_confirm is non-empty#17071
epage merged 2 commits into
rust-lang:masterfrom
raushan728:fix/publish-workspace-deadlock-17028

Conversation

@raushan728

@raushan728 raushan728 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

View all comments

Fixes #17028

PR #16722 introduced a check that fires an internal error when ready is empty inside the publish loop. It fired even when packages were still legitimately waiting for registry confirmation in to_confirm, causing valid workspace publishes to fail with a false deadlock error. A true deadlock only exists when both ready and to_confirm are empty.

@rustbot rustbot added A-interacts-with-crates.io Area: interaction with registries Command-publish S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 4, 2026
@rustbot

rustbot commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from ehuss, epage, weihanglo

Comment thread tests/testsuite/publish.rs Outdated
Comment thread tests/testsuite/publish.rs Outdated
@raushan728 raushan728 force-pushed the fix/publish-workspace-deadlock-17028 branch from 44e473d to 9072b53 Compare June 7, 2026 05:39
@rustbot

This comment has been minimized.

@raushan728 raushan728 requested a review from epage June 7, 2026 05:46
@raushan728 raushan728 force-pushed the fix/publish-workspace-deadlock-17028 branch from 9072b53 to 480f0e1 Compare June 7, 2026 10:26
Comment thread tests/testsuite/publish.rs
@raushan728 raushan728 force-pushed the fix/publish-workspace-deadlock-17028 branch from 480f0e1 to 0721b4d Compare June 9, 2026 13:54
@rustbot

rustbot commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@raushan728 raushan728 force-pushed the fix/publish-workspace-deadlock-17028 branch from 0721b4d to ae3b65d Compare June 9, 2026 14:05

@epage epage left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@epage epage added this pull request to the merge queue Jun 10, 2026
@epage

epage commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@weihanglo thoughts on beta backport?

Merged via the queue into rust-lang:master with commit b50aa17 Jun 10, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 10, 2026
@weihanglo

Copy link
Copy Markdown
Member

Yeah. Given the fix is minimal I think it is not too risky to have a beta-backport, though surprisingly that #17028 seems to have less reports than I expected.

@raushan728 raushan728 deleted the fix/publish-workspace-deadlock-17028 branch June 10, 2026 03:11
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 11, 2026
Update cargo submodule

11 commits in 0b1123a48825309b697312b44fdb64b3df00c958..fe63976b245b8a649c3f2949bf89fdc307bfbae4
2026-06-01 21:20:28 +0000 to 2026-06-11 09:17:57 +0000
- refactor: reduce use `Summary::{as_summary,into_summary}` (rust-lang/cargo#17092)
- docs(diag): Provide jumping off points for writing diagnostics and passes (rust-lang/cargo#17090)
- refactor(source): drop `Source::is_yanked` (rust-lang/cargo#17091)
- refactor(resolver): move yank policy to resolver layer  (rust-lang/cargo#17083)
- fix(publish): avoid false deadlock when to_confirm is non-empty (rust-lang/cargo#17071)
- doc(guide): use fresh actions/checkout version in GH actions examples (rust-lang/cargo#17087)
- fix: strip CR from `cargo:token-from-stdout` (rust-lang/cargo#17081)
- test: show some odd `--precise` cases (rust-lang/cargo#17082)
- chore(deps): update rust crate gix to 0.84.0 (rust-lang/cargo#17063)
- refactor: drop `yanked_whitelist` from source loading (rust-lang/cargo#17014)
- chore(deps): update msrv to v1.96 (rust-lang/cargo#17041)
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 11, 2026
Update cargo submodule

11 commits in 0b1123a48825309b697312b44fdb64b3df00c958..fe63976b245b8a649c3f2949bf89fdc307bfbae4
2026-06-01 21:20:28 +0000 to 2026-06-11 09:17:57 +0000
- refactor: reduce use `Summary::{as_summary,into_summary}` (rust-lang/cargo#17092)
- docs(diag): Provide jumping off points for writing diagnostics and passes (rust-lang/cargo#17090)
- refactor(source): drop `Source::is_yanked` (rust-lang/cargo#17091)
- refactor(resolver): move yank policy to resolver layer  (rust-lang/cargo#17083)
- fix(publish): avoid false deadlock when to_confirm is non-empty (rust-lang/cargo#17071)
- doc(guide): use fresh actions/checkout version in GH actions examples (rust-lang/cargo#17087)
- fix: strip CR from `cargo:token-from-stdout` (rust-lang/cargo#17081)
- test: show some odd `--precise` cases (rust-lang/cargo#17082)
- chore(deps): update rust crate gix to 0.84.0 (rust-lang/cargo#17063)
- refactor: drop `yanked_whitelist` from source loading (rust-lang/cargo#17014)
- chore(deps): update msrv to v1.96 (rust-lang/cargo#17041)
epage pushed a commit that referenced this pull request Jun 11, 2026
…-empty (#17071)

Backport of #17071.

Fixes #17028

PR #16722 introduced a check that fires an internal error when `ready`
is empty inside the publish loop. It fired even when packages were still
legitimately waiting for registry confirmation in `to_confirm`, causing
valid workspace publishes to fail with a false deadlock error. A true
deadlock only exists when both `ready` and `to_confirm` are empty.
epage added a commit that referenced this pull request Jun 11, 2026
…-empty (#17094)

Beta backports

- #17071

In order to make CI pass, the following PRs are also cherry-picked:

-
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 11, 2026
Update cargo submodule

11 commits in 0b1123a48825309b697312b44fdb64b3df00c958..fe63976b245b8a649c3f2949bf89fdc307bfbae4
2026-06-01 21:20:28 +0000 to 2026-06-11 09:17:57 +0000
- refactor: reduce use `Summary::{as_summary,into_summary}` (rust-lang/cargo#17092)
- docs(diag): Provide jumping off points for writing diagnostics and passes (rust-lang/cargo#17090)
- refactor(source): drop `Source::is_yanked` (rust-lang/cargo#17091)
- refactor(resolver): move yank policy to resolver layer  (rust-lang/cargo#17083)
- fix(publish): avoid false deadlock when to_confirm is non-empty (rust-lang/cargo#17071)
- doc(guide): use fresh actions/checkout version in GH actions examples (rust-lang/cargo#17087)
- fix: strip CR from `cargo:token-from-stdout` (rust-lang/cargo#17081)
- test: show some odd `--precise` cases (rust-lang/cargo#17082)
- chore(deps): update rust crate gix to 0.84.0 (rust-lang/cargo#17063)
- refactor: drop `yanked_whitelist` from source loading (rust-lang/cargo#17014)
- chore(deps): update msrv to v1.96 (rust-lang/cargo#17041)
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 11, 2026
Update cargo submodule

11 commits in 0b1123a48825309b697312b44fdb64b3df00c958..fe63976b245b8a649c3f2949bf89fdc307bfbae4
2026-06-01 21:20:28 +0000 to 2026-06-11 09:17:57 +0000
- refactor: reduce use `Summary::{as_summary,into_summary}` (rust-lang/cargo#17092)
- docs(diag): Provide jumping off points for writing diagnostics and passes (rust-lang/cargo#17090)
- refactor(source): drop `Source::is_yanked` (rust-lang/cargo#17091)
- refactor(resolver): move yank policy to resolver layer  (rust-lang/cargo#17083)
- fix(publish): avoid false deadlock when to_confirm is non-empty (rust-lang/cargo#17071)
- doc(guide): use fresh actions/checkout version in GH actions examples (rust-lang/cargo#17087)
- fix: strip CR from `cargo:token-from-stdout` (rust-lang/cargo#17081)
- test: show some odd `--precise` cases (rust-lang/cargo#17082)
- chore(deps): update rust crate gix to 0.84.0 (rust-lang/cargo#17063)
- refactor: drop `yanked_whitelist` from source loading (rust-lang/cargo#17014)
- chore(deps): update msrv to v1.96 (rust-lang/cargo#17041)
@rustbot rustbot added this to the 1.98.0 milestone Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-interacts-with-crates.io Area: interaction with registries Command-publish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"unexpected cargo internal error" on uv release 0.11.16 upload to crates.io

4 participants