I found a weird crash that seems to involve running #golang apps compiled for amd64 on an aarch64 system using #qemu.

It seems to be related to the Go GC, GOGC=off works. Go 1.20 also works.

The crash output from Go runtime is in this issue, but I've been able to reproduce this when building a very simple hello world app for amd64:

gitlab.com/postmarketOS/pmboot

Both Go's runtime/GC and qemu are complicated things I suck at debugging 😞

Help me fediverse, you're my only hope.

I would like to report this upstream, but I'm not sure which upstream... This problem seems to be specific to using qemu, but it only started crashing in Go 1.21. 🤷

Show thread

@craftyguy If it isn't reproducible on real hardware, surely it is a QEMU bug?

@newbyte derp. ya I think you're probably correct. I'll start thinking about how I can debug qemu...

@craftyguy @newbyte I assume the crash is in qemu-user-static ? This is o.k. to debug as you can run the built static binary right from your built qemu tree. When debugging the reverse (a arm64 binary crashing on amd64) QEMU_STRACE was very useful: qemu.org/docs/master/user/main

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml