Skip to content

go build hangs forever in 1.22.x #68582

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

Closed
difficultwork opened this issue Jul 25, 2024 · 2 comments
Closed

go build hangs forever in 1.22.x #68582

difficultwork opened this issue Jul 25, 2024 · 2 comments

Comments

@difficultwork
Copy link

Go version

go version go1.22.5 windows/amd64

Output of go env in your module/workspace:

set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\yanhongbo\AppData\Local\go-build
set GOENV=C:\Users\yanhongbo\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=E:\code\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=E:\code\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=D:\program\develop\go
set GOSUMDB=off
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=D:\program\develop\go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.22.5
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=E:\code\go\src\elftobuf\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\YANHON~1\AppData\Local\Temp\go-build30964277=/tmp/go-build -gno-record-gcc-switches

What did you do?

  1. upgrade go from 1.20 to 1.22(cause gopls tips).
  2. then doing a go build, hangs forever on builds,even if I rolled back the version to 1.20,code building still hangs.
  3. very few times the build can be successful,about 1 out of 10.
  4. I add "-x" in go build, but it hasn't improved.
  5. I saw go build hangs forever in 1.21.x #64705 and go build: get randomly stuck when building inside arm64 docker multi arch image #68464, I don't use docker here.

What did you see happen?

go build not hang

What did you expect to see?

infinite hang

@seankhliao
Copy link
Member

This sounds like a problem local to your environment, things like resource starvation or security software. I don't think we can be much help here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants