Skip to content

Fix lost wakeups with stdin and wasip3#12711

Merged
alexcrichton merged 1 commit intobytecodealliance:mainfrom
alexcrichton:fix-wakeups
Mar 9, 2026
Merged

Fix lost wakeups with stdin and wasip3#12711
alexcrichton merged 1 commit intobytecodealliance:mainfrom
alexcrichton:fix-wakeups

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

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.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasi Issues pertaining to WASI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants