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:
https://gitlab.com/postmarketOS/pmbootstrap/-/issues/2382
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. 🤷
@craftyguy If it isn't reproducible on real hardware, surely it is a QEMU bug?
@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: https://www.qemu.org/docs/master/user/main.html
@agx @newbyte
Thanks for the suggestion! I managed to bisect it, and filed my first #qemu issue :P
https://gitlab.com/qemu-project/qemu/-/issues/2560