sergey-shandar opened issue #11958:
Wasmtime (wasm32-wasip1-threads) crashes in release mode with Rust 1.91.
Steps to reporoduce:
Create a Rust library project with one empty test:
rust #[cfg(test)] mod tests { #[test] fn it_works() { } }Add
.cargo/config.toml:
toml [target.wasm32-wasip1-threads] runner = "wasmtime run --wasi threads --dir . --"Run
cargo test --target wasm32-wasip1-threads --release- Observe the message
memory allocation of 7200 bytes failed.Full Log
Compiling wasmtime-crash v0.1.0 (/home/runner/work/wasmtime-crash/wasmtime-crash) Finished `release` profile [optimized] target(s) in 0.15s Running unittests src/lib.rs (target/wasm32-wasip1-threads/release/deps/wasmtime_crash-2dc7c8acc224c302.wasm) memory allocation of 7200 bytes failed Error: failed to run main module `/home/runner/work/wasmtime-crash/wasmtime-crash/target/wasm32-wasip1-threads/release/deps/wasmtime_crash-2dc7c8acc224c302.wasm` Caused by: 0: failed to invoke command default 1: error while executing at wasm backtrace: 0: 0x4bc4e - wasmtime_crash-2dc7c8acc224c302.wasm!abort 1: 0x41212 - wasmtime_crash-2dc7c8acc224c302.wasm!std::sys::pal::wasip1::helpers::abort_internal::ha95e4b7b37825e00 2: 0x3c170 - wasmtime_crash-2dc7c8acc224c302.wasm!std::process::abort::h91607da9bb82ec87 3: 0x3c3cd - wasmtime_crash-2dc7c8acc224c302.wasm!std::alloc::rust_oom::h21bdef45e0e6a1a0 4: 0x3c39d - wasmtime_crash-2dc7c8acc224c302.wasm!__rustc[de0091b922c53d7e]::__rg_oom 5: 0xb4e - wasmtime_crash-2dc7c8acc224c302.wasm!__rustc[de0091b922c53d7e]::__rust_alloc_error_handler 6: 0x4e34f - wasmtime_crash-2dc7c8acc224c302.wasm!alloc::alloc::handle_alloc_error::h16f2cb08a8c8d330 7: 0x1562d - wasmtime_crash-2dc7c8acc224c302.wasm!std::sync::mpmc::Sender<T>::send::h16e0c33b47bbbcf8 8: 0x33142 - wasmtime_crash-2dc7c8acc224c302.wasm!test::run_test::h6c9fb36fafc2b781 9: 0x2edbb - wasmtime_crash-2dc7c8acc224c302.wasm!test::console::run_tests_console::hddcf495e81547068 10: 0x21677 - wasmtime_crash-2dc7c8acc224c302.wasm!test::test_main::h7a58e57b45f99f97 11: 0x213ca - wasmtime_crash-2dc7c8acc224c302.wasm!test::test_main_static::h416bc0fbae963dba 12: 0xa7e - wasmtime_crash-2dc7c8acc224c302.wasm!wasmtime_crash::main::h18852beb334594f8 13: 0xa99 - wasmtime_crash-2dc7c8acc224c302.wasm!std::sys::backtrace::__rust_begin_short_backtrace::hb37c57d27f11e5ce 14: 0xa8c - wasmtime_crash-2dc7c8acc224c302.wasm!std::rt::lang_start::{{closure}}::h5d5c6601c10fe938 15: 0x3f909 - wasmtime_crash-2dc7c8acc224c302.wasm!std::rt::lang_start_internal::hb64ce140b809498d 16: 0xaf4 - wasmtime_crash-2dc7c8acc224c302.wasm!__main_void 17: 0xa54 - wasmtime_crash-2dc7c8acc224c302.wasm!_start 2: wasm trap: wasm `unreachable` instruction executed running 1 test error: test failed, to rerun pass `--lib` Caused by: process didn't exit successfully: `wasmtime run --wasi threads --dir . -- /home/runner/work/wasmtime-crash/wasmtime-crash/target/wasm32-wasip1-threads/release/deps/wasmtime_crash-2dc7c8acc224c302.wasm` (exit status: 134) note: test exited abnormally; to see the full output pass --no-capture to the harness. test tests::it_works ...
sergey-shandar added the bug label to Issue #11958.
sergey-shandar edited issue #11958:
Wasmtime (wasm32-wasip1-threads) crashes in release mode with Rust 1.91.
Steps to reporoduce:
Create a Rust library project with one empty test:
rust #[cfg(test)] mod tests { #[test] fn it_works() { } }Add
.cargo/config.toml:
toml [target.wasm32-wasip1-threads] runner = "wasmtime run --wasi threads --dir . --"Run
cargo test --target wasm32-wasip1-threads --release- Observe the message
memory allocation of 7200 bytes failed.Full Log
Compiling wasmtime-crash v0.1.0 (/home/runner/work/wasmtime-crash/wasmtime-crash) Finished `release` profile [optimized] target(s) in 0.15s Running unittests src/lib.rs (target/wasm32-wasip1-threads/release/deps/wasmtime_crash-2dc7c8acc224c302.wasm) memory allocation of 7200 bytes failed Error: failed to run main module `/home/runner/work/wasmtime-crash/wasmtime-crash/target/wasm32-wasip1-threads/release/deps/wasmtime_crash-2dc7c8acc224c302.wasm` Caused by: 0: failed to invoke command default 1: error while executing at wasm backtrace: 0: 0x4bc4e - wasmtime_crash-2dc7c8acc224c302.wasm!abort 1: 0x41212 - wasmtime_crash-2dc7c8acc224c302.wasm!std::sys::pal::wasip1::helpers::abort_internal::ha95e4b7b37825e00 2: 0x3c170 - wasmtime_crash-2dc7c8acc224c302.wasm!std::process::abort::h91607da9bb82ec87 3: 0x3c3cd - wasmtime_crash-2dc7c8acc224c302.wasm!std::alloc::rust_oom::h21bdef45e0e6a1a0 4: 0x3c39d - wasmtime_crash-2dc7c8acc224c302.wasm!__rustc[de0091b922c53d7e]::__rg_oom 5: 0xb4e - wasmtime_crash-2dc7c8acc224c302.wasm!__rustc[de0091b922c53d7e]::__rust_alloc_error_handler 6: 0x4e34f - wasmtime_crash-2dc7c8acc224c302.wasm!alloc::alloc::handle_alloc_error::h16f2cb08a8c8d330 7: 0x1562d - wasmtime_crash-2dc7c8acc224c302.wasm!std::sync::mpmc::Sender<T>::send::h16e0c33b47bbbcf8 8: 0x33142 - wasmtime_crash-2dc7c8acc224c302.wasm!test::run_test::h6c9fb36fafc2b781 9: 0x2edbb - wasmtime_crash-2dc7c8acc224c302.wasm!test::console::run_tests_console::hddcf495e81547068 10: 0x21677 - wasmtime_crash-2dc7c8acc224c302.wasm!test::test_main::h7a58e57b45f99f97 11: 0x213ca - wasmtime_crash-2dc7c8acc224c302.wasm!test::test_main_static::h416bc0fbae963dba 12: 0xa7e - wasmtime_crash-2dc7c8acc224c302.wasm!wasmtime_crash::main::h18852beb334594f8 13: 0xa99 - wasmtime_crash-2dc7c8acc224c302.wasm!std::sys::backtrace::__rust_begin_short_backtrace::hb37c57d27f11e5ce 14: 0xa8c - wasmtime_crash-2dc7c8acc224c302.wasm!std::rt::lang_start::{{closure}}::h5d5c6601c10fe938 15: 0x3f909 - wasmtime_crash-2dc7c8acc224c302.wasm!std::rt::lang_start_internal::hb64ce140b809498d 16: 0xaf4 - wasmtime_crash-2dc7c8acc224c302.wasm!__main_void 17: 0xa54 - wasmtime_crash-2dc7c8acc224c302.wasm!_start 2: wasm trap: wasm `unreachable` instruction executed running 1 test error: test failed, to rerun pass `--lib` Caused by: process didn't exit successfully: `wasmtime run --wasi threads --dir . -- /home/runner/work/wasmtime-crash/wasmtime-crash/target/wasm32-wasip1-threads/release/deps/wasmtime_crash-2dc7c8acc224c302.wasm` (exit status: 134) note: test exited abnormally; to see the full output pass --no-capture to the harness. test tests::it_works ...Example: https://github.com/sergey-shandar/wasmtime-crash/actions/runs/18984799268/job/54225881045
bjorn3 commented on issue #11958:
This doesn't look like wasmtime crashing, rather it is the wasm module itself that fails to allocate memory.
sergey-shandar commented on issue #11958:
This doesn't look like wasmtime crashing, rather it is the wasm module itself that fails to allocate memory.
You may be right because
wasmeralso fails and I've found this issue: https://github.com/rust-lang/rust/issues/146843
alexcrichton closed issue #11958:
Wasmtime (wasm32-wasip1-threads) crashes in release mode with Rust 1.91.
Steps to reporoduce:
Create a Rust library project with one empty test:
rust #[cfg(test)] mod tests { #[test] fn it_works() { } }Add
.cargo/config.toml:
toml [target.wasm32-wasip1-threads] runner = "wasmtime run --wasi threads --dir . --"Run
cargo test --target wasm32-wasip1-threads --release- Observe the message
memory allocation of 7200 bytes failed.Full Log
Compiling wasmtime-crash v0.1.0 (/home/runner/work/wasmtime-crash/wasmtime-crash) Finished `release` profile [optimized] target(s) in 0.15s Running unittests src/lib.rs (target/wasm32-wasip1-threads/release/deps/wasmtime_crash-2dc7c8acc224c302.wasm) memory allocation of 7200 bytes failed Error: failed to run main module `/home/runner/work/wasmtime-crash/wasmtime-crash/target/wasm32-wasip1-threads/release/deps/wasmtime_crash-2dc7c8acc224c302.wasm` Caused by: 0: failed to invoke command default 1: error while executing at wasm backtrace: 0: 0x4bc4e - wasmtime_crash-2dc7c8acc224c302.wasm!abort 1: 0x41212 - wasmtime_crash-2dc7c8acc224c302.wasm!std::sys::pal::wasip1::helpers::abort_internal::ha95e4b7b37825e00 2: 0x3c170 - wasmtime_crash-2dc7c8acc224c302.wasm!std::process::abort::h91607da9bb82ec87 3: 0x3c3cd - wasmtime_crash-2dc7c8acc224c302.wasm!std::alloc::rust_oom::h21bdef45e0e6a1a0 4: 0x3c39d - wasmtime_crash-2dc7c8acc224c302.wasm!__rustc[de0091b922c53d7e]::__rg_oom 5: 0xb4e - wasmtime_crash-2dc7c8acc224c302.wasm!__rustc[de0091b922c53d7e]::__rust_alloc_error_handler 6: 0x4e34f - wasmtime_crash-2dc7c8acc224c302.wasm!alloc::alloc::handle_alloc_error::h16f2cb08a8c8d330 7: 0x1562d - wasmtime_crash-2dc7c8acc224c302.wasm!std::sync::mpmc::Sender<T>::send::h16e0c33b47bbbcf8 8: 0x33142 - wasmtime_crash-2dc7c8acc224c302.wasm!test::run_test::h6c9fb36fafc2b781 9: 0x2edbb - wasmtime_crash-2dc7c8acc224c302.wasm!test::console::run_tests_console::hddcf495e81547068 10: 0x21677 - wasmtime_crash-2dc7c8acc224c302.wasm!test::test_main::h7a58e57b45f99f97 11: 0x213ca - wasmtime_crash-2dc7c8acc224c302.wasm!test::test_main_static::h416bc0fbae963dba 12: 0xa7e - wasmtime_crash-2dc7c8acc224c302.wasm!wasmtime_crash::main::h18852beb334594f8 13: 0xa99 - wasmtime_crash-2dc7c8acc224c302.wasm!std::sys::backtrace::__rust_begin_short_backtrace::hb37c57d27f11e5ce 14: 0xa8c - wasmtime_crash-2dc7c8acc224c302.wasm!std::rt::lang_start::{{closure}}::h5d5c6601c10fe938 15: 0x3f909 - wasmtime_crash-2dc7c8acc224c302.wasm!std::rt::lang_start_internal::hb64ce140b809498d 16: 0xaf4 - wasmtime_crash-2dc7c8acc224c302.wasm!__main_void 17: 0xa54 - wasmtime_crash-2dc7c8acc224c302.wasm!_start 2: wasm trap: wasm `unreachable` instruction executed running 1 test error: test failed, to rerun pass `--lib` Caused by: process didn't exit successfully: `wasmtime run --wasi threads --dir . -- /home/runner/work/wasmtime-crash/wasmtime-crash/target/wasm32-wasip1-threads/release/deps/wasmtime_crash-2dc7c8acc224c302.wasm` (exit status: 134) note: test exited abnormally; to see the full output pass --no-capture to the harness. test tests::it_works ...Example: https://github.com/sergey-shandar/wasmtime-crash/actions/runs/18984799268/job/54225881045
alexcrichton commented on issue #11958:
Agreed yes this is unlikely to be a Wasmtime issue, so I'm going to close this. Feel free to follow-up upstream however.
Last updated: Dec 06 2025 at 06:05 UTC