Skip to content

Fix async resolver worker deadlock#11

Merged
chrmarti merged 4 commits into
mainfrom
chrmarti/fix-async-worker-deadlock
Jul 14, 2026
Merged

Fix async resolver worker deadlock#11
chrmarti merged 4 commits into
mainfrom
chrmarti/fix-async-worker-deadlock

Conversation

@chrmarti

@chrmarti chrmarti commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Release the in-flight map mutex before notifying async resolution waiters.

The previous if let lock(...).get(...).cloned() left the sole resolver worker unable to process a second distinct queued request, so later async callers waited forever.

Regression coverage

tests/async_resolution.rs runs two distinct async resolutions in a subprocess. The parent kills and fails a child that does not exit within five seconds, so a wedged std::thread cannot hang the whole test suite.

Verified with isolated build directories:

  • fix commit: passes in ~20 ms
  • old runtime dependency 4e2bfc6: fails in 5.01 s with async resolver worker did not process its second distinct request

Validation

  • cargo test --features tokio --test async_resolution
  • cargo test --features tokio
  • cargo clippy --all-targets --features tokio -- -D warnings
  • cargo fmt --all -- --check

@chrmarti
chrmarti merged commit 4fba194 into main Jul 14, 2026
26 checks passed
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