Skip to content

chore(deps): bump tokio to 1.54.1 - #11946

Merged
basvandijk merged 2 commits into
masterfrom
bas/bump-tokio-1.54.1
Oct 26, 2026
Merged

basvandijk merged 2 commits into
masterfrom
bas/bump-tokio-1.54.1

Conversation

@basvandijk

Copy link
Copy Markdown
Collaborator

Summary

Resolves the 2 open cargo Dependabot alerts for GHSA-5wjr-9356-4wc8 (medium), filed against Cargo.lock and Cargo.Bazel.toml.lock.

Crate Old → New Alerts closed
tokio 1.54.0 → 1.54.1 #640, #642 (GHSA-5wjr-9356-4wc8)

Notes:

  • The bug. In tokio 1.54.0, tokio::time::Interval::poll_tick (including .tick().await) can drop an internal timer entry while the multi-threaded runtime's time driver is firing it. That is a data race and use-after-free on the timer's waker and task state, which shows up as assertion panics, task ref-count corruption or heap corruption. Sleep and Timeout are not affected.
  • The replica is exposed. It runs on a multi-threaded runtime and uses tokio::time::interval in p2p (consensus_manager's sender, peer_manager, state_sync_manager) and in nns_delegation_manager, among others.
  • Minimal lockfile change.
    • cargo update -p tokio --precise 1.54.1 also re-resolves unrelated multi-version edges onto versions that are already locked: hyper-util, quinn and quinn-udp move from socket2 0.5.10 to 0.6.3, and several windows-sys edges move too. Master's lockfile is stable under cargo update --workspace, so the tokio unlock alone triggers this.
    • tokio 1.54.1's manifest differs from 1.54.0's only in the version. So Cargo.lock changes just tokio's version and checksum, and the checksum matches crates.io.
    • cargo update --workspace leaves that lockfile untouched ("Locking 0 packages"), and cargo fetch --locked accepts it.
    • The Bazel repin produced the minimal diff without help: the tokio version and checksum, the tokio id renames, and the config checksum.
  • The floor is raised in both Cargo.toml and bazel/rust.MODULE.bazel, so neither build can resolve 1.54.0 again.

How regenerated

# Cargo.toml, bazel/rust.MODULE.bazel: tokio floor 1.54.0 -> 1.54.1
# Cargo.lock: tokio version + checksum only (see above)
./bin/bazel-pin.sh tokio=1.54.1

Test plan

  • cargo update --workspace && ./bin/bazel-pin.sh is a no-op ("Locking 0 packages", "Nothing to repin."). This mirrors CI's lock-generate.
  • cargo fetch --locked
  • bazel run //bazel:buildifier.check
  • bazel test on tokio 1.54.1 (confirmed in the query graph) for the Interval users above, 7/7 passed:
    • //rs/http_endpoints/nns_delegation_manager:nns_delegation_manager_test;
    • the unit and integration tests of //rs/p2p/consensus_manager, //rs/p2p/peer_manager and //rs/p2p/state_sync_manager.
  • CI passes with CI_ALL_BAZEL_TARGETS. That includes rust-lint.sh, which CI runs on *.toml/*.lock changes.
  • Dependabot closes chore: introduce boundary-node-pkg package group  #640 and chore: Bump rust version to 1.80 #642 after merge. The Cargo.Bazel.toml.lock alert closes once bazel-dependency-submission has run on master.

🤖 Generated with Claude Code

tokio 1.54.0 (yanked) has a race between `Interval::poll_tick` and the
multi-threaded runtime's time driver that can drop a timer entry the
driver is still firing: a use-after-free in safe Rust
(GHSA-5wjr-9356-4wc8). 1.54.1 reverts the change that introduced it
(tokio-rs/tokio#8692).

The floor is raised in Cargo.toml and bazel/rust.MODULE.bazel so that
neither build can resolve 1.54.0 again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@basvandijk basvandijk added the CI_ALL_BAZEL_TARGETS Runs all bazel targets label Oct 26, 2026
@github-actions github-actions Bot added the chore label Oct 26, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>

Copilot AI 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.

🟢 Approval recommended

The focused patch upgrade is consistent across both build systems, with no blocking issues identified.

No open issues 🎉

What changed in this PR

Updates Tokio from 1.54.0 to 1.54.1 across Cargo and Bazel to address the interval timer race described in GHSA-5wjr-9356-4wc8.

Changes:

  • Raises the minimum Tokio version in both build configurations.
  • Synchronizes lockfile versions, checksums, and Bazel dependency references without changing features or unrelated dependencies.
File Description
Cargo.toml Raises the workspace Tokio requirement to 1.54.1.
Cargo.lock Updates Tokio’s locked version and checksum.
Cargo.Bazel.toml.lock Updates Bazel’s Cargo lock entry for Tokio.
Cargo.Bazel.json.lock Refreshes Tokio references, download metadata, and configuration checksum.
bazel/​rust.MODULE.bazel Raises Bazel’s Tokio requirement to 1.54.1.

Review effort: Balanced

@basvandijk
basvandijk marked this pull request as ready for review October 26, 2026 09:09
@basvandijk
basvandijk requested a review from a team as a code owner October 26, 2026 09:09
@basvandijk
basvandijk merged commit b9f8bbf into master Oct 26, 2026
44 checks passed
@basvandijk
basvandijk deleted the bas/bump-tokio-1.54.1 branch October 26, 2026 10:42
basvandijk added a commit that referenced this pull request Oct 26, 2026
Resolve the conflict with #11946 (tokio 1.54.1). Both PRs rewrote the
top-level "checksum" line of Cargo.Bazel.json.lock; the rest of that
file and the other lockfiles merged cleanly. `./bin/bazel-pin.sh`
recomputed the checksum and changed nothing else.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants