go: cmd/go: git remote (Gerrit) did not send all necessary objects
What version of Go are you using (go version
)?
$ go version go version go1.12 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
$ go env GOARCH="amd64" GOBIN="" GOCACHE="/usr/local/google/home/ukai/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/usr/local/google/home/ukai/go" GOPROXY="" GORACE="" GOROOT="/usr/lib/google-golang" GOTMPDIR="" GOTOOLDIR="/usr/lib/google-golang/pkg/tool/linux_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/dev/null" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build741696436=/tmp/go-build -gno-record-gcc-switches"
What did you do?
$ ls /tmp/go
ls: cannot access '/tmp/go': No such file or directory
$ mkdir /tmp/go
$ GOPATH=/tmp/go GO111MODULE=on go install go.chromium.org/goma/server/cmd/remoteexec_proxy
What did you expect to see?
go modules downloaded and binary is built.
What did you see instead?
...
go: finding grpc.go4.org v0.0.0-20170609214715-11d0a25b4919
go: google.golang.org/api@v0.0.0-20181030000543-1d582fd0359e: git -c protocol.version=0 fetch --unshallow -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /tmp/go/pkg/mod/cache/vcs/9e62a95b0409d58bc0130bae299bdffbc7b7e74f3abe1ecf897474cc474b8bc0: exit status 128:
fatal: bad object c7964aab01c00a07d0cc6216a78a5570459cebfd
error: remote did not send all necessary objects
..
go: error loading module requirements
I could fix it by
$ cd /tmp/go/pkg/mod/cache/vcs/9e62a95b0409d58bc0130bae299bdffbc7b7e74f3abe1ecf897474cc474b8bc0; git fetch --unshallow
then go install
works as expected.
https://bugs.chromium.org/p/chromium/issues/detail?id=951546
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 61 (23 by maintainers)
Commits related to this issue
- Update go dependencies not affected by the issue with googlesource repos Waiting on the following to be resolved: https://github.com/golang/go/issues/31399 — committed to transcom/mymove by deleted user 5 years ago
The Gerrit team says the fix is fully rolled out now. Please let us know if you’re still seeing these symptoms.
Thanks @tparker and @draftcode for working on this. I’ll close this issue now.
If anyone is still seeing this, please let us know.
This was fully deployed by yesterday afternoon, PDT.
The reproduction case above only failed in production-like environments, so it took longer to track down. The next fix forgoes potential data transfer optimizations in the name of correctness. Unshallow operations will be full clones. We will work on reintroducing the optimizations but that is a multi-week project that won’t begin immediately.
The patch is in our release process, building and verifying. It should start rolling it out in a few hours.
Okay, on my second try it also fails for me.
I’m reopening.
I’m using the latest Alpine Linux variant for Go 1.12. It doesn’t seem like a docker build cache issue as the build also fails in TravisCI. I’ve included the command output with
docker build --no-cache
below. The error is near the bottom.Maybe it’s an issue w/ the alpine linux 3.9 version of git (v2.20.1-r0)? Local builds (on Mac OS X with git 2.21.0) succeed.
It seems @jayconrod found a reproducible case. I’m trying to debug JGit again.
@anjmao I couldn’t reproduce this. Are you seeing this consistently? Does this happen with an empty module cache (i.e.,
export GOPATH=$(mktemp -d)
)? Anything unusual about your environment (git config, git version, proxy settings)?If you can give us a sequence of git commands that reproduces this (i.e., from
go get -x
), that would be very helpful.Sorry to say we hit a snag in the release process. We are working through it and will have a release ready later this afternoon. But releasing on a Friday afternoon is…dicey. We will wait until Monday to update the servers.
Good news is that the fix bypasses all the finicky calculations that have caused this problem to recur, and we have verified it in a production-like environment.
@bcmills Issue still happens with docker build. image: golang:1.12-alpine
I’ve spoken with the Gerrit team. It sounds like Friday’s CL wasn’t a complete fix. They are working on fixing the remaining broken part.
Just hit this:
This is with a totally clean modcache, as it’s using a fresh Docker container for the build.
Is there a workaround for
go get
? I am unable to develop. Edit: I skipped over the workaround.