alexcrichton opened PR #12711 from alexcrichton:fix-wakeups to bytecodealliance:main:
I've been running some tests with wasip3 recently and I was running into a situation where a program would read stdin, get some data, and then stdin would be closed. The second read of stdin wouldn't get a wakeup and would get stuck forever despite stdin being closed. I'm not 100% sure what was happening but I'm highly suspect of the
Notify-based synchronization here as I know historically that's a tricky primitive to work with. This applies a hammer and moves some lock scopes up a bit further to avoid dealing with trickiness and instead ensure everything proceeds in lockstep.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested wasmtime-wasi-reviewers for a review on PR #12711.
alexcrichton requested pchickey for a review on PR #12711.
alexcrichton requested wasmtime-core-reviewers for a review on PR #12711.
github-actions[bot] added the label wasi on PR #12711.
pchickey submitted PR review.
alexcrichton updated PR #12711.
alexcrichton updated PR #12711.
alexcrichton has enabled auto merge for PR #12711.
alexcrichton added PR #12711 Fix lost wakeups with stdin and wasip3 to the merge queue.
alexcrichton merged PR #12711.
alexcrichton removed PR #12711 Fix lost wakeups with stdin and wasip3 from the merge queue.
Last updated: Mar 23 2026 at 16:19 UTC