Skip to content

fix: unpark correct parker on resize abort#92

Merged
ibraheemdev merged 1 commit intoibraheemdev:masterfrom
specula-org:fix/abort-unpark-wrong-parker
Apr 16, 2026
Merged

fix: unpark correct parker on resize abort#92
ibraheemdev merged 1 commit intoibraheemdev:masterfrom
specula-org:fix/abort-unpark-wrong-parker

Conversation

@Qian-Cheng-nju
Copy link
Copy Markdown
Contributor

Hi, thanks for papaya!

When a blocking resize is aborted, help_copy_blocking (raw/mod.rs:2073) unparks table.state().parker, but threads waiting for the resize are parked on next.state().parker. The unpark goes to the wrong parker instance and parked threads are never woken, causing a deadlock.

The fix changes table.state() to next.state() on the unpark call so it targets the parker where threads are actually waiting.

@Qian-Cheng-nju
Copy link
Copy Markdown
Contributor Author

Hi @ibraheemdev, just checking if you had a chance to look at this — happy to address any concerns!

@ibraheemdev
Copy link
Copy Markdown
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.

@ibraheemdev ibraheemdev merged commit 48487f7 into ibraheemdev:master Apr 16, 2026
15 checks passed
@Qian-Cheng-nju
Copy link
Copy Markdown
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.

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