dicej edited issue #7745:
Per https://github.com/WebAssembly/wasi-libc/issues/456#issuecomment-1866412804, a number of
wasi-sdk
andwasi-libc
tests are currently failing when run using Wasmtime but run successfully on other runtimes. They seem to be related to thread-local storage (e.g. tests involvingerrno
, which is a thread-local variable).Test Case
This file was built from https://github.com/WebAssembly/wasi-sdk/blob/main/tests/general/signals.c for
wasm32-wasi-threads
usingwasi-sdk
:Steps to Reproduce
First, install any recent version of Wasmtime (e.g. v16.0.0). Then:
tar xf signals.c.-O0.wasm.tar.gz wasmtime run signals.c.-O0.wasm
Expected Results
The expected output is:
psignal message for SIGINT: Interrupt
Actual Results
The actual output is:
Assertion failed: raise(_NSIG) == -1 && errno == EINVAL (: main: 31) Error: failed to run main module `signals.c.-O0.wasm` Caused by: 0: failed to invoke command default 1: error while executing at wasm backtrace: 0: 0x1072 - <unknown>!abort 1: 0x1179 - <unknown>!__assert_fail 2: 0x716 - <unknown>!__original_main 3: 0x1da - <unknown>!_start 2: wasm trap: wasm `unreachable` instruction executed
Versions and Environment
Wasmtime version or commit: v16.0.0
Operating system: MacOS (but should repro on any OS)
Architecture: ARM64 (but should repro on any architecture)
Extra Info
See also https://github.com/WebAssembly/wasi-threads/pull/49, which may be related.
dicej edited issue #7745:
UPDATE: The original issue was due to not specifying
-pthread
when building. Now the problem is that Wasmtime loops indefinitely when awasm32-wasi-threads
guest writes to stdout. See https://github.com/bytecodealliance/wasmtime/issues/7745#issuecomment-1877546864 for steps to reproduce.Original report follows:
Per https://github.com/WebAssembly/wasi-libc/issues/456#issuecomment-1866412804, a number of
wasi-sdk
andwasi-libc
tests are currently failing when run using Wasmtime but run successfully on other runtimes. They seem to be related to thread-local storage (e.g. tests involvingerrno
, which is a thread-local variable).Test Case
This file was built from https://github.com/WebAssembly/wasi-sdk/blob/main/tests/general/signals.c for
wasm32-wasi-threads
usingwasi-sdk
:Steps to Reproduce
First, install any recent version of Wasmtime (e.g. v16.0.0). Then:
tar xf signals.c.-O0.wasm.tar.gz wasmtime run signals.c.-O0.wasm
Expected Results
The expected output is:
psignal message for SIGINT: Interrupt
Actual Results
The actual output is:
Assertion failed: raise(_NSIG) == -1 && errno == EINVAL (: main: 31) Error: failed to run main module `signals.c.-O0.wasm` Caused by: 0: failed to invoke command default 1: error while executing at wasm backtrace: 0: 0x1072 - <unknown>!abort 1: 0x1179 - <unknown>!__assert_fail 2: 0x716 - <unknown>!__original_main 3: 0x1da - <unknown>!_start 2: wasm trap: wasm `unreachable` instruction executed
Versions and Environment
Wasmtime version or commit: v16.0.0
Operating system: MacOS (but should repro on any OS)
Architecture: ARM64 (but should repro on any architecture)
Extra Info
See also https://github.com/WebAssembly/wasi-threads/pull/49, which may be related.
alexcrichton closed issue #7745:
UPDATE: The original issue was due to not specifying
-pthread
when building. Now the problem is that Wasmtime loops indefinitely when awasm32-wasi-threads
guest writes to stdout. See https://github.com/bytecodealliance/wasmtime/issues/7745#issuecomment-1877546864 for steps to reproduce.Original report follows:
Per https://github.com/WebAssembly/wasi-libc/issues/456#issuecomment-1866412804, a number of
wasi-sdk
andwasi-libc
tests are currently failing when run using Wasmtime but run successfully on other runtimes. They seem to be related to thread-local storage (e.g. tests involvingerrno
, which is a thread-local variable).Test Case
This file was built from https://github.com/WebAssembly/wasi-sdk/blob/main/tests/general/signals.c for
wasm32-wasi-threads
usingwasi-sdk
:Steps to Reproduce
First, install any recent version of Wasmtime (e.g. v16.0.0). Then:
tar xf signals.c.-O0.wasm.tar.gz wasmtime run signals.c.-O0.wasm
Expected Results
The expected output is:
psignal message for SIGINT: Interrupt
Actual Results
The actual output is:
Assertion failed: raise(_NSIG) == -1 && errno == EINVAL (: main: 31) Error: failed to run main module `signals.c.-O0.wasm` Caused by: 0: failed to invoke command default 1: error while executing at wasm backtrace: 0: 0x1072 - <unknown>!abort 1: 0x1179 - <unknown>!__assert_fail 2: 0x716 - <unknown>!__original_main 3: 0x1da - <unknown>!_start 2: wasm trap: wasm `unreachable` instruction executed
Versions and Environment
Wasmtime version or commit: v16.0.0
Operating system: MacOS (but should repro on any OS)
Architecture: ARM64 (but should repro on any architecture)
Extra Info
See also https://github.com/WebAssembly/wasi-threads/pull/49, which may be related.
Last updated: Nov 22 2024 at 16:03 UTC