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: go get fails against GerritHub server #71282

Open
myitcv opened this issue Jan 15, 2025 · 7 comments
Open

cmd/go: go get fails against GerritHub server #71282

myitcv opened this issue Jan 15, 2025 · 7 comments
Labels
BugReport Issues describing a possible bug in the Go implementation. GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@myitcv
Copy link
Member

myitcv commented Jan 15, 2025

Go version

go version devel go1.24-368a9ec998 Tue Jan 14 14:54:07 2025 -0800 linux/arm64

Output of go env in your module/workspace:

AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/myitcv/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/no-home/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=$WORK/.tmp/go-build1451863026=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='arm64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/dev/null'
GOMODCACHE='/home/myitcv/gostuff/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/myitcv/gostuff'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/myitcv/dev/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/no-home/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/myitcv/dev/go/pkg/tool/linux_arm64'
GOVCS=''
GOVERSION='devel go1.24-368a9ec998 Tue Jan 14 14:54:07 2025 -0800'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

Testscript repro:

env GOPRIVATE=cuelang.org/go
go mod init mod.example
go get cuelang.org/go@master

What did you see happen?

> env GOPRIVATE=cuelang.org/go
> go mod init mod.example
[stderr]
go: creating new go.mod: module mod.example

> go get cuelang.org/go@master
[stderr]
go: cuelang.org/go@master: git fetch --unshallow -f origin in /home/myitcv/gostuff/pkg/mod/cache/vcs/d82383d43199d57840995f1c0a94e81eee5ed02e43dbba4468223292497673e2: exit status 1:
        error: Could not read b5e1647ec470060133fd6f7f1913fd1c65f5f75c
        fatal: Failed to traverse parents of commit 74a0c9d01e05b13cb15fa77371bbfb4461eccdff
        error: remote did not send all necessary objects

[exit status 1]
FAIL: /tmp/testscript1710667514/repro.txtar/script.txtar:3: unexpected go command failure

What did you expect to see?

Passing test.

Also relevant:

$ git --version
git version 2.48.1.2.g757161efcc

Raising this on the back of seeing #71261 and the fix from @rsc which appears to be somewhat related.

Note that the server here is GerritHub.io.

Per https://issues.gerritcodereview.com/issues/384756627 it might be a server issue. But per #71261 I guess it might be a client expectation issue.

@mknyszek mknyszek added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go labels Jan 15, 2025
@mknyszek mknyszek added this to the Backlog milestone Jan 15, 2025
@mknyszek
Copy link
Contributor

CC @samthanawalla

@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Jan 15, 2025
@seankhliao
Copy link
Member

this is actionable without a reproducer? or is it still broken?

@myitcv
Copy link
Member Author

myitcv commented Jan 23, 2025

@seankhliao if I'm honest I don't have the understanding of the git client/server involved to reduce further, without some guidance.

The above reproducer still fails for me:

> env GOPRIVATE=cuelang.org/go
> go mod init mod.example
[stderr]
go: creating new go.mod: module mod.example

> go get cuelang.org/go@master
[stderr]
go: cuelang.org/go@master: git fetch --unshallow -f origin in /home/myitcv/gostuff/pkg/mod/cache/vcs/d82383d43199d57840995f1c0a94e81eee5ed02e43dbba4468223292497673e2: exit status 1:
        error: Could not read b5e1647ec470060133fd6f7f1913fd1c65f5f75c
        fatal: Failed to traverse parents of commit 74a0c9d01e05b13cb15fa77371bbfb4461eccdff
        error: remote did not send all necessary objects

[exit status 1]
FAIL: /tmp/testscript669907862/repro.txtar/script.txtar:3: unexpected go command failure

@seankhliao
Copy link
Member

hmm, my git 2.48.1 from arch linux works though, where's your git from?

@myitcv
Copy link
Member Author

myitcv commented Jan 23, 2025

Very interesting. I'm using

$ git version
git version 2.48.1.76.g4e746b1a31

Built from source. But I can also reproduce with v2.48.1 build from source.

Just thinking out loud, but something else we can't rule out here is that you might be hitting a different replica of GerritHub.

@mvdan
Copy link
Member

mvdan commented Jan 24, 2025

I also run into this issue on git version 2.48.1 relatively regularly. Unfortunately it's not always easy to replicate; perhaps depending on the current state of the remote master branch, or the current state or replica of the server responding.

Right now, with https://pkg.go.dev/github.com/rogpeppe/go-internal/cmd/testscript - note that it starts with an isolated environment, so that means an empty GOMODCACHE - I cannot reproduce. However, it's worth noting that the script ran very slowly. I didn't measure the time, but it took multiple minutes, which doesn't make sense as the repository isn't that large.

I last ran into this failure just two days ago: https://issues.gerritcodereview.com/issues/384756627#comment3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation. GoCommand cmd/go 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

5 participants