I'm curious if @Afonso Bordado or others perhaps know what's going on here. At the CG meeting right now https://github.com/spinkube/containerd-shim-spin/issues/128 was brought up during a presentation as a blocker for running Wasmtime on riscv64 which boils down to:
thread '<unnamed>' panicked at /.../wasmtime-18.0.4/src/runtime/code_memory.rs:254:18:
Failed cache clear: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }
which corresponds to this part of the code I believe, specifically the risc-v-specific syscalls to manage the icache. That was originally added long ago and it's using syscalls that I don't personally know anything about, but Afonso (or others) do y'all know more to know why EPERM might be popping out?
I'm not entirely sure what is going on there. IIRC I tested that code on a VisionFive 2 as well, but with a super old kernel, so something might have changed.
If I'm not mistaken docker filters the allowed syscalls, and it might be that that one isn't allowed. (This is just a wild guess)
I'll try to reproduce that locally
good point, looking at the syscall itself it looks like EPERM isn't ever returned
so a syscall filter sounds pretty likely
It looks like some other projects have had similar issues with the JRE:
https://github.com/adoptium/adoptium-support/issues/697#issuecomment-1600734899
aha excellent thanks!
Last updated: Dec 23 2024 at 13:07 UTC