Stream: wasmtime

Topic: linux/arm64, SIGILL


view this post on Zulip Stephan Renatus (Jan 25 2022 at 17:12):

hey there. I've run into SIGILLs when using wasmtime (through wasmtime-go) on linux/arm64. I was wondering if this would be a possible symptom of https://github.com/bytecodealliance/wasmtime/issues/3183 and if using llvm instead of gcc would be a workaround. am I on the wrong track?

As of #3180 Wasmtime will stop workong on AArch64 Linux with PAC enabled. Debugging this issue at https://bytecodealliance.zulipchat.com/#narrow/stream/217126-wasmtime/topic/arm64.2C.20pointer.20au...

view this post on Zulip Chris Fallin (Jan 25 2022 at 17:42):

@Stephan Renatus are you seeing a SIGILL kill the process, or are you catching one while debugging? If the latter, we use SIGILL to catch traps (we generate an undefined instruction in the JIT code then unwind from our signal handler) so it's harmless; but if a SIGILL is escaping then that's definitely a bug

view this post on Zulip Stephan Renatus (Jan 25 2022 at 19:59):

that one was related to a test case where a wasm execution should hit a trap. it probably does, but not in the way that's expected (the tests succeed on amd64)

view this post on Zulip Alex Crichton (Jan 25 2022 at 20:02):

Hm I think it might be good to open an issue for this, I'm not aware of any issues arm64-specific about uncaught signals in wasmtime or wasmtime-go (and the tests all pass locally for me on arm64)

view this post on Zulip Stephan Renatus (Jan 25 2022 at 20:24):

here's something that happens on my machine 3/4 of the times, but I have to admit I'm not completely sure if this is the right way to emulate linux/arm64 on a macos/amd64 machine at all: https://gist.github.com/srenatus/fa1e3e1b55c6d505d3aa9c38bbdbc818

GitHub Gist: instantly share code, notes, and snippets.

view this post on Zulip Stephan Renatus (Jan 25 2022 at 20:25):

that doesn't replace a proper bug report; I'll open an issue when I get this cornered a little better.

view this post on Zulip Alex Crichton (Jan 25 2022 at 21:30):

hm yeah sorry I don't recognize much of what's going on there

view this post on Zulip Alex Crichton (Jan 25 2022 at 21:31):

other than that this is likely a signal from wasmtime that we're raising due to a normal trap and it's not being correctly caught by wasmtime for some reason

view this post on Zulip Stephan Renatus (Jan 26 2022 at 10:43):

https://github.com/bytecodealliance/wasmtime-go/issues/119

With this main.go (files here): package main import ( "log" "time" "github.com/bytecodealliance/wasmtime-go" ) func main() { bs, err := wasmtime.Wat2Wasm(` (func (expo...

Last updated: Nov 22 2024 at 16:03 UTC