Repository: go
Issue: runtime: async preemption support on ARM64 breaks ARM64 on QEMU
Labels: help wanted,NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->
The change in 1b0b9809046c1862f8ea0240fe016e516c67676f 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 73d20f8186a091c8d7e81b621136770981cf8e44 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 1b0b9809046c1862f8ea0240fe016e516c67676f.

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version devel +1b0b980904 Thu Nov 7 19:18:12 2019 +0000 linux/amd64
</pre>

### 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`.
<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE="on"
GOARCH="arm64"
GOBIN="/home/user/bin"
GOCACHE="/home/user/.cache/go-build"
GOENV="/home/user/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/user"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/user/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/user/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="0"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build167327579=/tmp/go-build -gno-record-gcc-switches"
~ $ lsb_release -d
Description:	Ubuntu 18.04.3 LTS
~ $ dpkg -l qemu-user qemu-system-common qemu-system-arm 
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                          Version             Architecture        Description
+++-=============================-===================-===================-===============================================================
ii  qemu-system-arm               1:2.11+dfsg-1ubuntu amd64               QEMU full system emulation binaries (arm)
ii  qemu-system-common            1:2.11+dfsg-1ubuntu amd64               QEMU full system emulation binaries (common files)
ii  qemu-user                     1:2.11+dfsg-1ubuntu amd64               QEMU user mode emulation binaries
</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->
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.