-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtime: async preemption support on ARM64 breaks ARM64 on QEMU #36981
Comments
cc @aclements @cherrymui @ianlancetaylor Is this something we need to fix for 1.14, since it is a regression? Tentatively marking release blocker. |
See #15050 (comment) and #1508 (comment). QEMU has historically been fairly buggy for multi-threaded programs, so a regression here is not a big surprise. Per the porting policy, supported platforms need to have a developer maintaining the port for that platform, and a builder running tests. If folks are relying on QEMU being able to run Go programs, then someone needs to volunteer to diagnose the QEMU bugs, and to either fix them in QEMU or actively maintain workarounds on the Go side. |
We have a very minimal "keep arm/arm64 qemu-user working with go binaries" test that I committed at 5095e5d (it only runs a hello world). But in general yeah, I don't think anyone has ever made a serious effort to keep qemu-user working and performant; so it shouldn't be expect to necessarily work well. |
@bcmills Ah, funny. I didn't have any memory of the deletion, even though you cc'ed me on the CL. So I guess qemu-user really shouldn't be expected to work smoothly. |
As @bcmills said, QEMU user mode is not actually supported. I think this is a QEMU bug in handling async signals, especially with signal context modifications. And it's not only ARM64, but also other architectures. For reference, for AMD64, qemu-x86_64 doesn't work since at least Go 1.6 (due to other reasons, not async signal).
|
Does it work on qemu-arm64 if you set |
Yes, it runs very happily with that variable set. |
The change in 1b0b980 breaks QEMU support for Go programs, resulting in a variety of crashes ranging from segmentation faults, illegal instructions and scheduler panics (holding locks).
This is partially recovered by the change in 73d20f8 which prevents the crashes, but results in extremely poor performance; processes appear only able to use about 10-15% of a core compared to ~100% prior to 1b0b980.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
No
What operating system and processor architecture are you using (
go env
)?Natively on amd64/linux, but qemu-user with
GOARCH=arm64
.go env
OutputWhat did you do?
In a checkout of gonum.org/v1/gonum/lapack/gonum, run
GOARCH=arm64 go test -run Dgeev
I have tried to make a smaller reproducer, but have not managed yet.
What did you expect to see?
Other expected package failures.
What did you see instead?
A variety of crashes.
The text was updated successfully, but these errors were encountered: