Test Case
Various CPython test cases have started failing when moving from wasmtime 13 to 16 due to ESPIPE. Adding --wasi threads=y fixes the issue which seems unrelated to file seeking.
Example failure run can be seen at https://buildbot.python.org/all/#/builders/1124/builds/640/steps/11/logs/stdio right after I switched to wasmtime 16 from 13 (wasmtime 14.0.4 does not seem to have the issue).
Steps to Reproduce
git clone https://github.com/python/cpython.git
cd cpython
python3 Tools/wasm/wasi.py build
- Edit
cross-build/wasm32-wasi/python.sh and remove --wasi threads=y
./cross-build/wasm32-wasi/python.sh -m test test___all__
You can also try test___all__ test_bufio test_compileall test_dbm_dumb test_importlib test_io test_marshal test_pathlib test_posix test_runpy test_tarfile test_zipfile .
Expected Results
The test should pass w/o issue (it was working fine under wasmtime 13 w/ e.g. wasmtime run --env PYTHONPATH=/builddir/wasi/build/lib.wasi-wasm32-3.12:/Lib --mapdir /::/home/brettcannon/Repositories/python/cpython-3.12 -- python.wasm.
Actual Results
W/o --wasi threads=y, it causes a ESPIPE.
Versions and Environment
Wasmtime version or commit: 16.0.0 and 15.0.1
Operating system: Linux
Architecture: x64
Extra Info
WASI-SDK 20.
Test Case
Various CPython test cases have started failing when moving from wasmtime 13 to 16 due to
ESPIPE. Adding--wasi threads=yfixes the issue which seems unrelated to file seeking.Example failure run can be seen at https://buildbot.python.org/all/#/builders/1124/builds/640/steps/11/logs/stdio right after I switched to wasmtime 16 from 13 (wasmtime 14.0.4 does not seem to have the issue).
Steps to Reproduce
git clone https://github.com/python/cpython.gitcd cpythonpython3 Tools/wasm/wasi.py buildcross-build/wasm32-wasi/python.shand remove--wasi threads=y./cross-build/wasm32-wasi/python.sh -m test test___all__You can also try test___all__ test_bufio test_compileall test_dbm_dumb test_importlib test_io test_marshal test_pathlib test_posix test_runpy test_tarfile test_zipfile .
Expected Results
The test should pass w/o issue (it was working fine under wasmtime 13 w/ e.g.
wasmtime run --env PYTHONPATH=/builddir/wasi/build/lib.wasi-wasm32-3.12:/Lib --mapdir /::/home/brettcannon/Repositories/python/cpython-3.12 -- python.wasm.Actual Results
W/o
--wasi threads=y, it causes aESPIPE.Versions and Environment
Wasmtime version or commit: 16.0.0 and 15.0.1
Operating system: Linux
Architecture: x64
Extra Info
WASI-SDK 20.