wasmtime: Unable to load modules on aarch64 linux machine via a rust based host app

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

Steps to Reproduce

  • The app uses the following to load the module
let mut config = wasmtime::Config::new();
let engine = wasmtime::Engine::new(&config)?;
let module = wasmtime::Module::from_file(&engine, "./test.wasm")?;

Expected Results

The module should load

Actual Results

Load fails with

thread ‘main’ panicked at ‘called Result::unwrap() on an Err value: Os { code: 22, kind: InvalidInput, message: “Invalid argument” }’, /home/rbackhouse/.cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-jit-1.0.0/src/code_memory.rs:63:14

Versions and Environment

Wasmtime version or commit: 1.0.0

Operating system: Ubuntu 18.04

Architecture: aarch64

Extra Info

The CPU being used is a Quad-core ARM Cortex-A57 MPCore processor.

Looking at code_memory.rs line 60 it seems the call

rustix::process::membarrier(
                rustix::process::MembarrierCommand::RegisterPrivateExpeditedSyncCore,
            )
            .unwrap();

is failing

If I comment out this call and the one at line 168 then everything works fine.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 17 (14 by maintainers)

Most upvoted comments

@afonso360 You are right, I found the docker engine version is 1.13. Upgrade docker to 20.10 and the test is fine. Thank you very much!