Stream: git-wasmtime

Topic: wasmtime / issue #6229 Allow the memfd feature to not be ...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2023 at 11:54):

hurae opened issue #6229:

So that I can use wasm in very low Linux kernel version, such as 2.6.32 .

I am trying to make a plugin system based on wasmtime to fit all OS. When targeting to x86_64-unknown-linux-musl, it compiles, but when I try to run it on CentOS 6.6 or Ubuntu 14.04, it just report the follows:

$ ./runner-amd64-linux-musl-minf
Error: Failed to instantiate

Caused by:
    0: cannot create a memfd
    1: Function not implemented (os error 38)

The wasmtime and enabled features:

wasmtime = { git = "https://github.com/bytecodealliance/wasmtime", rev = "cc1c14ac913be13329e5cfc91c33e053ab722132", features = [
  "component-model",
  "async",
] }

AFIK, CoW which relies on memfd_create is just not necessary, so can I get an option to not using it (in the feature form). It seems it's the only thing that prevents wasmtime to startup under older Linux kernel.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2023 at 11:55):

hurae edited issue #6229:

So that I can use wasm in very low Linux kernel version, such as 2.6.32 .

I am trying to make a plugin system based on wasmtime to fit all OS. When targeting to x86_64-unknown-linux-musl, it compiles, but when I try to run it on CentOS 6.6 or Ubuntu 14.04, it just report the follows:

$ ./runner-amd64-linux-musl-minf
Error: Failed to instantiate

Caused by:
    0: cannot create a memfd
    1: Function not implemented (os error 38)

The wasmtime version and enabled features:

wasmtime = { git = "https://github.com/bytecodealliance/wasmtime", rev = "cc1c14ac913be13329e5cfc91c33e053ab722132", features = [
  "component-model",
  "async",
] }

AFIK, CoW which relies on memfd_create is just not necessary, so can I get an option to not using it (in the feature form). It seems it's the only thing that prevents wasmtime to startup under older Linux kernel.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2023 at 12:22):

bjorn3 commented on issue #6229:

I think you can do config.memory_init_cow(false).

view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2023 at 16:07):

alexcrichton commented on issue #6229:

Thanks for the report! I've also posted https://github.com/bytecodealliance/wasmtime/pull/6230 in addition to what @bjorn3 mentioned, to handle this in the future without needing explicit configuration.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2023 at 17:27):

alexcrichton closed issue #6229:

So that I can use wasm in very low Linux kernel version, such as 2.6.32 .

I am trying to make a plugin system based on wasmtime to fit all OS. When targeting to x86_64-unknown-linux-musl, it compiles, but when I try to run it on CentOS 6.6 or Ubuntu 14.04, it just report the follows:

$ ./runner-amd64-linux-musl-minf
Error: Failed to instantiate

Caused by:
    0: cannot create a memfd
    1: Function not implemented (os error 38)

The wasmtime version and enabled features:

wasmtime = { git = "https://github.com/bytecodealliance/wasmtime", rev = "cc1c14ac913be13329e5cfc91c33e053ab722132", features = [
  "component-model",
  "async",
] }

AFIK, CoW which relies on memfd_create is just not necessary, so can I get an option to not using it (in the feature form). It seems it's the only thing that prevents wasmtime to startup under older Linux kernel.


Last updated: Dec 23 2024 at 12:05 UTC