fix: unpark correct parker on resize abort#92
Merged
ibraheemdev merged 1 commit intoibraheemdev:masterfrom Apr 16, 2026
Merged
Conversation
Contributor
Author
|
Hi @ibraheemdev, just checking if you had a chance to look at this — happy to address any concerns! |
Owner
|
This seems correct, did you run into a deadlock caused by this? It's unfortunate that we don't really have any test coverage for this code path because it's quite difficult to trigger. |
Contributor
Author
|
We didn't hit it at runtime — we were reading through the resize code and noticed that help_copy_blocking parks on next.state().parker but the abort path unparks table.state().parker. Since they're different Parker instances, any thread parked during an abort would never get woken. It's definitely a rare path, but seemed worth a fix since it's a one-liner. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, thanks for papaya!
When a blocking resize is aborted,
help_copy_blocking(raw/mod.rs:2073) unparkstable.state().parker, but threads waiting for the resize are parked onnext.state().parker. The unpark goes to the wrong parker instance and parked threads are never woken, causing a deadlock.The fix changes
table.state()tonext.state()on the unpark call so it targets the parker where threads are actually waiting.