Stream: git-wasmtime

Topic: wasmtime / Issue #1268 A way to stop WASM instance when e...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 10 2020 at 10:02):

rene-fonseca opened Issue #1268:

Feature

Would it be possible to add a way to send a trap or similar to the WASM instance from any caller at any time from API to force a currently running instance to terminate nicely. It is kind of like sending a POSIX abort/interrupt signal().

Benefit

Allow WASM instance to be aborted nicely when it would otherwise run in infinite loop. When to abort, is then fully controllable from caller.

Implementation

Allow special trap to be sent from external caller thread which would be injected into a given running thread or all threads of the WASM instance. Which any return will trigger a trap within a given time or execution cycles.

Alternatives

Not sure what else could be done. There is no guarantee that an import is called from the WASM instance to hook for arbitrary modules.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 10 2020 at 15:37):

alexcrichton commented on Issue #1268:

Thanks for the report! I believe this is covered by https://github.com/bytecodealliance/wasmtime/issues/860, or that's at least where we've been consolidating these sorts of feature requests, so I'm going to close this in favor of that.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 10 2020 at 15:37):

alexcrichton closed Issue #1268:

Feature

Would it be possible to add a way to send a trap or similar to the WASM instance from any caller at any time from API to force a currently running instance to terminate nicely. It is kind of like sending a POSIX abort/interrupt signal().

Benefit

Allow WASM instance to be aborted nicely when it would otherwise run in infinite loop. When to abort, is then fully controllable from caller.

Implementation

Allow special trap to be sent from external caller thread which would be injected into a given running thread or all threads of the WASM instance. Which any return will trigger a trap within a given time or execution cycles.

Alternatives

Not sure what else could be done. There is no guarantee that an import is called from the WASM instance to hook for arbitrary modules.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 10 2020 at 15:43):

rene-fonseca commented on Issue #1268:

Thanks.


Last updated: Oct 23 2024 at 20:03 UTC