You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
poll() third's argument is timeout in milliseconds. Any attempt to set a timeout other than -1 (wait forever) or very large value fails. I have discussed the matter with @sunfishcode on Discord. He said:
That appears to be a bug in wasi-libc. It's translating the poll timeout into a request using the REALTIME (wall-clock) clock. It should use the MONOTONIC clock.
Thanks for the report! Looking into it more, POSIX does specify that things like nanosleep use the REALTIME timer, however Linux uses the MONOTONIC timer. POSIX also says that these functions aren't affected by clock_settime, so in practice there's very little difference. I think it makes sense to change Wasmtime here to accept either form of timer, and I've now implemented this in bytecodealliance/wasmtime#4777.
poll()
third's argument is timeout in milliseconds. Any attempt to set a timeout other than -1 (wait forever) or very large value fails. I have discussed the matter with @sunfishcode on Discord. He said:reproducer
/opt/wasi-sdk/bin/clang poll.c -o poll.wasm && RUST_LOG=wasi_common wasmtime run poll.wasm
The text was updated successfully, but these errors were encountered: