-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Description
Go version
go version go1.23.3 linux/arm64
Output of go env
in your module/workspace:
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/root/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/root/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/go/pkg/tool/linux_arm64'
GOVCS=''
GOVERSION='go1.23.3'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/root/.config/go/telemetry'
GCCGO='gccgo'
GOARM64='v8.0'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2732334604=/tmp/go-build -gno-record-gcc-switches'
What did you do?
When I build Go 1.23 with the same version of Go under qemu-user, the build hangs all the way. The issue can be reproduced with a Dockerfile:
from quay.io/fedora/fedora:41
RUN dnf install -y @development-tools
RUN curl -O https://go.dev/dl/go1.23.3.src.tar.gz && curl -O https://go.dev/dl/go1.23.3.linux-arm64.tar.gz
RUN tar fx go1.23.3.linux-arm64.tar.gz && mkdir src && tar fx go1.23.3.src.tar.gz -C src
RUN cd src/go/src/; env PATH=$PATH:/go/bin bash make.bash
Steps:
- Setup qemu-user binfmt for a foreign ISA, for example, installs qemu-user-static-aarch64 on Fedora.
- Build the Dockerfile for specified arch:
podman build --arch aarch64 .
Tested on Fedora 40 with 6.9.8-200.fc40.x86_64
and Fedora 41 with 6.11.6-300.fc41.x86_64
.
Tested with qemu-user 9.1.1 of riscv64/loongarch64/aarch64.
What did you see happen?
The go processes of the build hangs forever:
│ ├─crun-buildah-buildah663882417.scope
│ │ └─container
│ │ ├─912459 /usr/bin/qemu-aarch64-static /usr/bin/bash make.bash
│ │ ├─914348 /usr/bin/qemu-aarch64-static ./cmd/dist/dist bootstrap -a
│ │ ├─914395 /usr/bin/qemu-aarch64-static /go/bin/go install "-tags=math_big_pure_go compiler_bootstrap purego" bootstrap/cmd/...
│ │ └─914743 /usr/bin/qemu-aarch64-static /go/bin/go install "-tags=math_big_pure_go compiler_bootstrap purego" bootstrap/cmd/...
The issue does not exist with Go 1.22. I did a bisect and found the offending commit d068c2c .
What did you expect to see?
Build of Go 1.23 runs through under qemu-user.
ace-cohere and DDoSolitary
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.