You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running on docker (4.0.1) on a Mac M1 and cross launching docker run -it --platform linux/amd64 golang /bin/bash, it's impossible to build any files, and randomly go commands will fail. For example:
root@d7d6c6bb9361:/go# go env
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
root@d7d6c6bb9361:/go# go env
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
root@d7d6c6bb9361:/go# go env
GO111MODULE=""
GOARCH="amd64"
...
root@d7d6c6bb9361:/go# go fmt main.go
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
root@d7d6c6bb9361:/go# go fmt main.go
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
root@d7d6c6bb9361:/go# go fmt main.go
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
root@d7d6c6bb9361:/go# go fmt main.go
main.go
We ran up against a similar issue and found that segfaults occur only when using golang binaries built with Alpine-based golang images. Switching to the standard Golang Docker images fixed our issue.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes, seems to happen since 1.17
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
When running on docker (4.0.1) on a Mac M1 and cross launching
docker run -it --platform linux/amd64 golang /bin/bash
, it's impossible to build any files, and randomly go commands will fail. For example:When trying to build a simple hello world:
First seen on 1.17.0
These steps work fine with go 1.16.8
and also on arm64:
Not sure if this is go or qemu (docker) related. When running arm64, there is no qemu involved.
arm64:
amd64:
for reference: golang-nuts thread:
https://groups.google.com/g/golang-nuts/c/BxPjtPjN11A
What did you expect to see?
something else then a segfault :)
What did you see instead?
a segfault
The text was updated successfully, but these errors were encountered: