Skip to content
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

Thread Proposal and Determinism / Reproducibility #1485

Open
adamgfraser opened this issue Aug 10, 2023 · 1 comment
Open

Thread Proposal and Determinism / Reproducibility #1485

adamgfraser opened this issue Aug 10, 2023 · 1 comment
Labels

Comments

@adamgfraser
Copy link

One of the advantages of WASM programs has been that with very limited exceptions they are deterministic and so they can also be executed reproducibly. The inclusion of threads has the potential to introduce a new very large exception to that.

Has there been any discussion of supporting features to allow WASM program involving threads to be executed reproducibly? For example recording the ordering in which shared memory interactions occur and allowing a program to be executed with the same ordering as a previous execution?

@conrad-watt
Copy link
Contributor

A deterministic replay mode for arbitrary Wasm programs with shared-memory concurrency would take a lot of engineering to support in a production engine, so I don't think we can mandate this at the language level for the foreseeable future. You can look at the state-of-the-art in native C/C++ compilation for an idea of how feasible it would be for Wasm engines to individually offer this - from a brief search I could only find solutions that are currently research proof-of-concepts.

We are planning to support deterministic replay in the reference interpreter, but this wouldn't handle non-trivial compiled programs.

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

No branches or pull requests

3 participants