Skip to content
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

cmd/go: get hangs indefinitely for go get -x -u ./... #60145

Closed
dpanic opened this issue May 12, 2023 · 10 comments
Closed

cmd/go: get hangs indefinitely for go get -x -u ./... #60145

dpanic opened this issue May 12, 2023 · 10 comments
Labels
GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@dpanic
Copy link

dpanic commented May 12, 2023

What version of Go are you using (go version)?

go version go1.20.4 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
GO111MODULE=""
GOARCH="amd64"
GOBIN="/home/dpanic/go/bin"
GOCACHE="/home/dpanic/.cache/go-build"
GOENV="/home/dpanic/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/dpanic/go/pkg/mod"
GONOPROXY="*.internal.mycompany.com"
GONOSUMDB="*.internal.mycompany.com"
GOOS="linux"
GOPATH="/home/dpanic/go"
GOPRIVATE="*.internal.mycompany.com"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.4"
GCCGO="gccgo"
GOAMD64="v1"
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 -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1976099889=/tmp/go-build -gno-record-gcc-switches"

What did you do?

go get -u ./...

What did you expect to see?

Finished go mod update

What did you see instead?

Stuck process

image

@seankhliao
Copy link
Member

please provide a repo that reproduces the issue

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label May 12, 2023
@dpanic
Copy link
Author

dpanic commented May 12, 2023

please provide a repo that reproduces the issue

@seankhliao here is replica of that repo https://github.com/dpanic/broken

I can't share original repo because of the NDA.

Let's say that:

  • on new go.mod I don't have problem
  • on old go.mod I have problem, and I have different go.sum (which could be okay)

I added go.mod.broken_one and go.sum.broken_one from the repo I can't share

@seankhliao seankhliao added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go modules and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels May 12, 2023
@seankhliao seankhliao changed the title cmd/go: get hangs indefinitely for go get -x -u ./... on package github.com/twitchyliquid64/golang-asm cmd/go: get hangs indefinitely for go get -x -u ./... May 12, 2023
@seankhliao
Copy link
Member

cc @bcmills @matloob

@bcmills
Copy link
Contributor

bcmills commented May 12, 2023

@dpanic, there is a known severe bug in go get (#55955). Could you try patching in https://go.dev/cl/471595 and see if that fixes your case too?

@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label May 12, 2023
@bcmills bcmills added this to the Backlog milestone May 12, 2023
@bcmills
Copy link
Contributor

bcmills commented May 12, 2023

Also, how long was the process stuck, and were there any open connections to proxy.golang.org or running git commands at the time?

@dpanic
Copy link
Author

dpanic commented May 14, 2023

Also, how long was the process stuck, and were there any open connections to proxy.golang.org or running git commands at the time?

I let it run for 6h ... I did strace on process (I can do it again and share with you output if needed, it was constantly doing something, looked like dead loop to me).

No connections to proxy.golang.org at the time of process being stuck, nor before. No git commands either.
image

@dpanic
Copy link
Author

dpanic commented May 14, 2023

https://go.dev/cl/471595

@dpanic, there is a known severe bug in go get (#55955). Could you try patching in https://go.dev/cl/471595 and see if that fixes your case too?

@bcmills tried, git clone than git checkout to branch which already has patch applied. compiled Go from scratch.

Something wrong with this version...Maybe I did something wrong, IDK.
image

@bcmills
Copy link
Contributor

bcmills commented May 15, 2023

The missing GOSUMDB error comes from here:
https://cs.opensource.google/go/go/+/master:src/cmd/go/internal/modfetch/sumdb.go;l=80;drc=f229e7031a6efb2f23241b5da000c3b3203081d6

That suggests that the environment in which you are running go get does not match the go env output from the original issue report: that go env shows GOSUMDB="sum.golang.org", which should take the knownGOSUMDB path here:
https://cs.opensource.google/go/go/+/master:src/cmd/go/internal/modfetch/sumdb.go;l=75-77;drc=f229e7031a6efb2f23241b5da000c3b3203081d6

@bcmills bcmills removed the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label May 15, 2023
@dpanic
Copy link
Author

dpanic commented May 15, 2023

@bcmills tnx, works when I set GOSUMDV:
GOSUMDB="sum.golang.org" /home/dpanic/Downloads/go/bin/go get -x -u ./...

This version of Go resolved my issue!

Thanks

@seankhliao
Copy link
Member

Duplicate of #55955

@seankhliao seankhliao marked this as a duplicate of #55955 May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants