Stream: git-wasmtime

Topic: wasmtime / issue #4912 static_memory_bound is too big let...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2022 at 00:13):

yuyang-ok opened issue #4912:

Finished test [unoptimized + debuginfo] target(s) in 1m 11s
Running tests/host_segfault.rs (/home/yuyang/projects/wasmtime/target/debug/deps/host_segfault-69e695fd58d52fab)
thread 'main' panicked at '

expected a stack overflow on hit async stack guard page with pooling allocator
got status: exit status: 101
stderr: ----
thread 'main' panicked at 'size:6002G memory_size:6144M max_memories:1 max_instances:1000 initial_memory_offset:2048M static_memory_bound:65536', crates/runtime/src/instance/allocator/pooling.rs:726:13
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

', tests/host_segfault.rs:213:13
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
error: test failed, to rerun pass '--test host_segfault'


let allocation_size = memory_size
.checked_mul(max_memories)
.and_then(|c| c.checked_mul(max_instances))
.and_then(|c| c.checked_add(initial_memory_offset))
.ok_or_else(|| {
anyhow!("total size of memory reservation exceeds addressable memory")
})?;
if (allocation_size >> 30) >= 16 {
panic!(
"size:{}G memory_size:{}M max_memories:{} max_instances:{} initial_memory_offset:{}M static_memory_bound:{}",
allocation_size >> 30,
memory_size >> 20,
max_memories,
max_instances,
initial_memory_offset >> 20,
tunables. static_memory_bound,
);
}


view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2022 at 00:14):

yuyang-ok commented on issue #4912:

https://github.com/bytecodealliance/wasmtime/blob/main/crates/runtime/src/instance/allocator/pooling.rs#L718

view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2022 at 01:20):

jameysharp commented on issue #4912:

You're running these tests in qemu, right? When our GitHub Actions run tests in qemu, they set WASMTIME_TEST_NO_HOG_MEMORY=1. I don't understand exactly what that's for, but maybe it would help you?

view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2022 at 01:26):

yuyang-ok commented on issue #4912:

@jameysharp I am not running in qemu. The number is too big cann't be right.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2022 at 07:53):

yuyang-ok deleted a comment on issue #4912:

@jameysharp I am not running in qemu. The number is too big cann't be right.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2022 at 07:57):

yuyang-ok commented on issue #4912:

maybe this is related to qemu-riscv64 implementation.
I found that allocation_size on riscv64gc-unknown-linux-gnu is the same as x86_64-unknown-linux-gnu.
but target x86_64-unknown-linux-gnu can pass the test host_segment.
on my local mechine qemu-riscv64 will exhaust all physical memory.

@jameysharp I have WASMTIME_TEST_NO_HOG_MEMORY=1.

Running /home/yuyang/projects/qemu/build/qemu-riscv64 -L /usr/riscv64-linux-gnu -E LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib -E WASMTIME_TEST_NO_HOG_MEMORY=1 /home/yuyang/projects/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/deps/host_segfault-0362e2365a90b3f7
thread 'main' panicked at '

expected a stack overflow on hit async stack guard page with pooling allocator
got status: exit status: 101
stderr: ----
thread 'main' panicked at 'size:6002G memory_size:6144M max_memories:1 max_instances:1000 initial_memory_offset:2048M static_memory_bound:65536', crates/runtime/src/instance/allocator/pooling.rs:726:13
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

', tests/host_segfault.rs:213:13
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
error: test failed, to rerun pass '--test host_segfault'


view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2022 at 08:02):

yuyang-ok edited issue #4912:

Finished test [unoptimized + debuginfo] target(s) in 26.99s
Running /home/yuyang/projects/qemu/build/qemu-riscv64 -L /usr/riscv64-linux-gnu -E LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib -E WASMTIME_TEST_NO_HOG_MEMORY=1 /home/yuyang/projects/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/deps/host_segfault-0362e2365a90b3f7
thread 'main' panicked at '

expected a stack overflow on hit async stack guard page with pooling allocator
got status: signal: 9 (SIGKILL)

', tests/host_segfault.rs:213:13
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
error: test failed, to rerun pass '--test host_segfault'


view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2022 at 08:03):

yuyang-ok edited a comment on issue #4912:

maybe this is related to qemu-riscv64 implementation.
I found that allocation_size on riscv64gc-unknown-linux-gnu is the same as x86_64-unknown-linux-gnu.
but target x86_64-unknown-linux-gnu can pass the test host_segment.
on my local mechine qemu-riscv64 will exhaust all physical memory.

@jameysharp I have WASMTIME_TEST_NO_HOG_MEMORY=1.


Last updated: Nov 22 2024 at 16:03 UTC