Stream: git-wasmtime

Topic: wasmtime / issue #8846 `wasmtime serve` can't run compone...


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

dicej opened issue #8846:

Since wasmtime serve was switched to using the pooling allocator, which defaults to a memory limit of 10MB, components built with e.g. componentize-py or componentize-dotnet will no longer run by default. Also, since there is currently no CLI option to override that memory limit, the only workaround is to disable the pooling allocator entirely using wasmtime serve -O pooling-allocator=n.

I propose that we address this with the following changes:

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

dicej commented on issue #8846:

See also https://github.com/bytecodealliance/wasmtime/issues/8504 and https://github.com/bytecodealliance/componentize-py/issues/94

view this post on Zulip Wasmtime GitHub notifications bot (Jun 20 2024 at 14:10):

dicej commented on issue #8846:

Also, (mainly to help search engines find this issue) this is the kind of error message you get: Error: memory index 0 has a minimum page size of 223 which exceeds the limit of 160

view this post on Zulip Wasmtime GitHub notifications bot (Jun 20 2024 at 15:10):

alexcrichton commented on issue #8846:

Can you test whether -Opooling-max-memory-size=N enables running these components? Sorry I keep meaning to raise the limit here and keep forgetting, but I also want to confirm orthogonally that this option works since that's what it's supposed to do

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

dicej commented on issue #8846:

 $ wasmtime serve -Opooling-max-memory-size=160 -S cli target/component.wasm
error: unknown -O / --optimize option: pooling-max-memory-size

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

dicej edited a comment on issue #8846:

 $ wasmtime --version
wasmtime-cli 21.0.1 (cedf9aa0f 2024-05-22)
 $ wasmtime serve -Opooling-max-memory-size=160 -S cli target/component.wasm
error: unknown -O / --optimize option: pooling-max-memory-size

Maybe that's new on main?

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

alexcrichton commented on issue #8846:

I think that might be Wasmtime 21+, what version do you have for that?

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

dicej commented on issue #8846:

Sorry, just edited the comment; it's 21.0.1

view this post on Zulip Wasmtime GitHub notifications bot (Jun 20 2024 at 15:15):

alexcrichton commented on issue #8846:

Oh sorry, for some reason I had Wasmtime 22 installed instead of the 21 version, which explains this!

view this post on Zulip Wasmtime GitHub notifications bot (Jun 20 2024 at 16:35):

alexcrichton closed issue #8846:

Since wasmtime serve was switched to using the pooling allocator, which defaults to a memory limit of 10MB, components built with e.g. componentize-py or componentize-dotnet will no longer run by default. Also, since there is currently no CLI option to override that memory limit, the only workaround is to disable the pooling allocator entirely using wasmtime serve -O pooling-allocator=n.

I propose that we address this with the following changes:


Last updated: Nov 22 2024 at 16:03 UTC