Stream: wasmtime

Topic: Possible determinism issues


view this post on Zulip Olexiy Kulchitskiy (Apr 27 2022 at 16:09):

Hi, guys! I'm new to all this WASM stuff and looking for deterministic WASM runtime (for some POC). Please advise whether Wasmtime is handling non-determinism issues and if yes, how (would be nice to point to some article/code)?

view this post on Zulip Chris Fallin (Apr 27 2022 at 17:31):

Hi @Olexiy Kulchitskiy -- the execution of Wasm in Wasmtime should be completely deterministic with a few exceptions:

view this post on Zulip Chris Fallin (Apr 27 2022 at 17:32):

Ah, stack depth as well; the point at which one gets a stack-overflow trap is implementation-defined (but that should not be observable in any normally-returning Wasm call, as the trap terminates the instance)

view this post on Zulip bjorn3 (Apr 27 2022 at 17:56):

And the memory allocation limit.

view this post on Zulip Dan Gohman (Apr 27 2022 at 18:03):

You may also want to use the static_memory_forced API, to prevent memory.grow allocation from failing nondeterministically.

view this post on Zulip Olexiy Kulchitskiy (Apr 27 2022 at 18:57):

got it. Thank you

view this post on Zulip Lars Hansen (May 02 2022 at 08:44):

Relaxed SIMD will be deterministic per-platform but will appear nondeterministic across platforms - basically the same problem as for NaNs, but will require a different solution.


Last updated: Oct 23 2024 at 20:03 UTC