Licenser added the bug label to Issue #8781.
Licenser opened issue #8781:
Test Case
A full reproduction, including the test case, can be found here: https://github.com/Licenser/wasi-io-hang
Steps to Reproduce
- Create WASI environment
- Create an AsyncStdoutStream and use it as stdout
- load a wasi program that writes more than once to stdout
- in the wasi program, write to stdout
- read once and observe a correct result
- in the wasi program, the write call never returns
- the whole program hangs
Expected Results
I would expect to be able to write multiple times from withtin the wasi program when using an
AsyncStdoutStream
as stdout.Actual Results
The first write to stdout never finishes, and the wasi program hangs.
Versions and Environment
Wasmtime version or commit: 21.0.1
Operating system: OSX
Architecture: ARMv8 (M3)
Extra Info
I have looked for other examples of using
AsyncStdoutStream
, the main repository doesn't seem to have any more is it used in tests, I might be doing something wrong but this could be a genuine bug.
alexcrichton commented on issue #8781:
Thanks for the report and reproduction! I think this should be fixed by https://github.com/bytecodealliance/wasmtime/pull/8782. Is that something you'd like to see backported to the Wasmtime 22 release happening on June 20? Otherwise it'll get released on July 20.
Licenser commented on issue #8781:
Heya, thanks for the quick fix!
No need to backport it :) I appreciate the offer, but it's totally okay for me to point to a GitHub ref until the end of July - it's exploratory nonproduction code at the moment anyway, so I don't want to cause extra work for you.
alexcrichton closed issue #8781:
Test Case
A full reproduction, including the test case, can be found here: https://github.com/Licenser/wasi-io-hang
Steps to Reproduce
- Create WASI environment
- Create an AsyncStdoutStream and use it as stdout
- load a wasi program that writes more than once to stdout
- in the wasi program, write to stdout
- read once and observe a correct result
- in the wasi program, the write call never returns
- the whole program hangs
Expected Results
I would expect to be able to write multiple times from withtin the wasi program when using an
AsyncStdoutStream
as stdout.Actual Results
The first write to stdout never finishes, and the wasi program hangs.
Versions and Environment
Wasmtime version or commit: 21.0.1
Operating system: OSX
Architecture: ARMv8 (M3)
Extra Info
I have looked for other examples of using
AsyncStdoutStream
, the main repository doesn't seem to have any more is it used in tests, I might be doing something wrong but this could be a genuine bug.
Licenser commented on issue #8781:
I just wanted to confirm the fix :+1:. I tried it this morning, and it works like a charm. Thanks a lot Alex!
Last updated: Nov 22 2024 at 17:03 UTC