Skip to content

fix(cli): shut down the owned runtime with live handles - #263

Merged
ivanwang-coder merged 2 commits into
dev/mantle-v1.7.0from
fix/v170-owned-runtime-shutdown
Nov 19, 2026
Merged

ivanwang-coder merged 2 commits into
dev/mantle-v1.7.0from
fix/v170-owned-runtime-shutdown

Conversation

@ivanwang-coder

Copy link
Copy Markdown

Summary

The v1.7.0 CLI released its own handle during shutdown while other tasks could still hold clones. In that case tasks could outlive CLI shutdown, and releasing the last clone on a Tokio worker could panic.

Backport paradigmxyz#27313. The CLI shuts down the owned Tokio runtime from its shutdown thread. The final handle can also be dropped safely in async context, and a runtime supplied by the caller continues running.

Add reth-tasks and reth-cli-runner to the workspace so the four upstream regression tests run in PR CI. The workspace commit includes the import ordering applied by just fmt to these newly included crates.

Test plan

  • On the unpatched release branch, reproduced the worker-drop panic and the CLI returning with a live task using the two upstream tests that compile against the old API.
  • cargo test --locked -p reth-tasks -p reth-cli-runner --lib passed all 35 tests, including the four upstream regressions.
  • Full local just pr passed, including all-features Clippy, 2,227 workspace unit tests, 380 Mantle integration tests, and workspace doctests.

@ivanwang-coder
ivanwang-coder merged commit 29ed3e4 into dev/mantle-v1.7.0 Nov 19, 2026
2 checks passed
@ivanwang-coder
ivanwang-coder deleted the fix/v170-owned-runtime-shutdown branch November 19, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants