-
Notifications
You must be signed in to change notification settings - Fork 5k
[CoreCLR] fibers on Windows - Wasmtime Async Compatibility #96293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsDescriptionWasmtime supports async WASM execution, which can suspend running WASM code and resume it later. Unfortunately the implementation seems to be incompatible with dotnet. Reproduction Steps
Expected behaviorWasmtime async should work in dotnet. Whether this should involve a change to dotnet or a change to wasmtime I'm not sure. My motivation here is really just like to draw attention to this incompatibility and to get some input from dotnet developers on the PR. Actual behaviorTests fail with According to this comment it can sometimes crash with "Fatal error. Internal CLR error." or "AccessViolationException". Regression?No response Known WorkaroundsNo response ConfigurationNo response Other informationNo response
|
I would guess arch-wasm probably isn't the right tag, since this is about using wasm within dotnet rather than dotnet within wasm. |
Yeah, I noticed - but it's probably the best way to get eyes on the issue from the right folks at this point in time - they can re-assign the arch if they feel it is incorrectly assigned. |
More work is happening here https://github.com/dicej/isyswasfa |
I believe that we have initial implementation for this now for WASIp2. See This will improve with WASIp3 |
@pavelsavara I don't think that resolves this issue. That looks like it's for async support when compiling C# to WASM. But this issue about the other case - when C# is acting as the host for WASM execution (using wasmtime-dotnet). In this case the async features of wasmtime cannot be used because they are built with fibers, which are incompatible with dotnet:
|
Ah, so this is not about WASI at all. This is about CoreCLR vs wasmtime on windows |
I think that somebody from CoreCLR needs to close this as |
Tagging subscribers to this area: @mangod9 |
According to this comment from one of the Wasmtime developers there's no alternative way to implement stack switching on Windows others than fibers. If there's no chance of dotnet gaining support for using fibers is there some other dotnet compatible alternative wasmtime could switch to? |
Uh oh!
There was an error while loading. Please reload this page.
Description
When C# is acting as the host for WASM execution (using wasmtime-dotnet), wasmtime will try to use fibers and fail.
Wasmtime supports async WASM execution, which can suspend running WASM code and resume it later.
Unfortunately the implementation seems to be incompatible with running inside dotnet.
Reproduction Steps
Expected behavior
Wasmtime async should work in dotnet.
Whether this should involve a change to dotnet or a change to wasmtime I'm not sure. My motivation here is really just like to draw attention to this incompatibility and to get some input from dotnet developers on the PR.
Actual behavior
Tests fail with
System.Runtime.InteropServices.SEHException
when hitting a breakpoint.According to this comment it can sometimes crash with "Fatal error. Internal CLR error." or "AccessViolationException".
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: