Deterministic replay for WebAssembly threads and racy programs

Develop a deterministic replay mechanism for WebAssembly modules that use the WebAssembly threads proposal, ensuring correctness and faithfulness even in the presence of data races, and provide satisfactory and robust solutions for replaying racy programs recorded by Wasm-R3.

Background

Wasm-R3 records and replays executions of WebAssembly modules by capturing interactions with the host environment and re-emulating them. While the approach supports many WebAssembly features, the authors note that supporting multithreading is particularly challenging. In WebAssembly, the threads proposal introduces shared memory concurrency, where nondeterminism and data races complicate faithful deterministic replay.

The paper explicitly states that achieving deterministic replay for racy programs remains an open research question, indicating the need for new techniques or mechanisms to handle concurrency-related nondeterminism during replay without engine or host cooperation.

References

"The most challenging proposal to support would be threads, which remains an open research question, as deterministic replay of racy programs lacks satisfactory and robust solutions."

Wasm-R3: Record-Reduce-Replay for Realistic and Standalone WebAssembly Benchmarks  (2409.00708 - Baek et al., 2024) in Section 6 (Limitations)