Stream: git-wasmtime

Topic: wasmtime / issue #8607 pooling allocator should take virt...


view this post on Zulip Wasmtime GitHub notifications bot (May 13 2024 at 19:14):

matsbror added the bug label to Issue #8607.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2024 at 19:14):

matsbror opened issue #8607:

Thanks for filing a bug report! Please fill out the TODOs below.

Test Case

Hello wasi http

Steps to Reproduce

These steps fail on Ubuntu 24.04/riscv64 on VisionFive 2 and on Ubuntu 18.04/aarch64 on Nvidia Jetson Nano.

Expected Results

I would have expected the tutorial to work as described.

Actual Results

jetson@360lab-nano2:~/docker/hello-wasi-http$ wasmtime serve -O pooling-allocator=y target/wasm32-wasi/debug/hello_wasi_http.wasm
Error: failed to create memory pool mapping                                                                                                                                                                                                     Caused by:
    0: mmap failed to reserve 0x5dc80000000 bytes
    1: Cannot allocate memory (os error 12)

When running without pooling allocator it works:

jetson@360lab-nano2:~/docker/hello-wasi-http$ wasmtime serve -O pooling-allocator=n target/wasm32-wasi/debug/hello_wasi_http.wasm
Serving HTTP on http://0.0.0.0:8080/

Versions and Environment

Wasmtime version or commit: 21.0

Operating system:

Architecture:

Extra Info

I guess there should be a way to detect the virtual address size as it seems to be around 39 bits in these architectures.

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2024 at 20:34):

alexcrichton commented on issue #8607:

In lieu of directly probing address space limitations I've opted to do something slightly different in https://github.com/bytecodealliance/wasmtime/pull/8610 which probes for a large reservation to succeed before attempting another one for the pooling allocator.

view this post on Zulip Wasmtime GitHub notifications bot (May 14 2024 at 03:13):

matsbror commented on issue #8607:

Thanks. Will this also help spin, which uses wasmtime as library? The same error occurs there.

view this post on Zulip Wasmtime GitHub notifications bot (May 14 2024 at 14:48):

alexcrichton commented on issue #8607:

Not directly, no, but I can propose the same change on Spin to have the same effect

view this post on Zulip Wasmtime GitHub notifications bot (May 14 2024 at 15:27):

alexcrichton closed issue #8607:

Thanks for filing a bug report! Please fill out the TODOs below.

Test Case

Hello wasi http

Steps to Reproduce

These steps fail on Ubuntu 24.04/riscv64 on VisionFive 2 and on Ubuntu 18.04/aarch64 on Nvidia Jetson Nano.

Expected Results

I would have expected the tutorial to work as described.

Actual Results

jetson@360lab-nano2:~/docker/hello-wasi-http$ wasmtime serve -O pooling-allocator=y target/wasm32-wasi/debug/hello_wasi_http.wasm
Error: failed to create memory pool mapping                                                                                                                                                                                                     Caused by:
    0: mmap failed to reserve 0x5dc80000000 bytes
    1: Cannot allocate memory (os error 12)

When running without pooling allocator it works:

jetson@360lab-nano2:~/docker/hello-wasi-http$ wasmtime serve -O pooling-allocator=n target/wasm32-wasi/debug/hello_wasi_http.wasm
Serving HTTP on http://0.0.0.0:8080/

Versions and Environment

Wasmtime version or commit: 21.0

Operating system:

Architecture:

Extra Info

I guess there should be a way to detect the virtual address size as it seems to be around 39 bits in these architectures.


Last updated: Dec 23 2024 at 12:05 UTC