Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

interrupt wasm module #23

Open
srenatus opened this issue May 14, 2021 · 3 comments
Open

interrupt wasm module #23

srenatus opened this issue May 14, 2021 · 3 comments

Comments

@srenatus
Copy link

Hi. I'm further diving into wapc, and there're some very nice ideas in there! 😃

One thing I could not find so far is, are you able to stop a guest call of it's taking too much time? In wasmtime, you'd use the interrupt handle to set a trap, but I don't see why of that used here. What's your approach? 🤔

@autodidaddict
Copy link
Collaborator

The wapc host runtime (Rust) supports multiple engines, wasm3 and wasmtime. As such we can't support things like aborting an execution unless both engines support it.

That said, wasmcloud, which builds on top of wapc, does have time limits and can abort calls, It just doesn't use the wasm engine to do it.

@srenatus
Copy link
Author

srenatus commented May 14, 2021

That said, wasmcloud, which builds on top of wapc, does have time limits and can abort calls, It just doesn't use the wasm engine to do it.

Would you mind going into detail, or sharing a code link, please?

@autodidaddict
Copy link
Collaborator

autodidaddict commented May 14, 2021

Sure. If you take a look at wasmcloud in the wasmcloud host crate you'll see where we have a bunch of rpc timeouts.

That said, if a guest wasm spins into an infinite loop we do not currently have a way to shut that down gracefully, and we can use this issue to track that.

In short, the entire host will continue unbroken but that one module will be useless in that scenario and that's definitely something we need to take care of.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants