-
Notifications
You must be signed in to change notification settings - Fork 297
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
Engine
deadlocks when calling from host function to WASM.
#567
Comments
I am aware of this problem. I was not aware that Wasmtime allows this behavior though. However, it is actually simpler with a JIT compiler compared to an interpreter since there is much more state in an interpreter that needs to be carried over to new function executions. It is not impossible to fix. We could probably solve this by allowing multiple executors per engine and create new executors on the fly and reuse old ones to reduce frequent heap allocations. Currently we only have a single executor per engine. |
Well, if it is difficult to solve, it's OK. I'll try to remove these allocations to make sure no deadlocks :) |
@Berrysoft btw thank you a lot for writing all those issues! That really help us improving |
Closed in favor of #572. |
The
Engine
locks when calling a WASM function. If the WASM function calls a host function, and the host function calls another WASM function, it deadlocks.Unfortunately, my use case heavily depends on this calling routine. The host function calls a WASM function to make an ABI-compatible allocation. The same code passes on Wasmtime. It seems not a simple problem to solve, but I think it is better to point it out.
The text was updated successfully, but these errors were encountered: