Go: cmd/go: <go module bug with github.com/ugorji/go >

Created on 19 Dec 2018  路  9Comments  路  Source: golang/go

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

$ go version
go version go1.11.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

$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/benjamin/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/benjamin/go"
GOPROXY=""
GORACE=""
GOROOT="/home/benjamin/.go"
GOTMPDIR=""
GOTOOLDIR="/home/benjamin/.go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/benjamin/go/src/github.com/bigpigeon/Test/go/etcd_bug/go.mod"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build419003286=/tmp/go-build -gno-record-gcc-switches"

What did you do?

code in github gist

What did you expect to see?

nothing

What did you see instead?

panic: codecgen version mismatch: current: 8, need 10. Re-generate file: /home/benjamin/go/pkg/mod/go.etcd.io/[email protected]+incompatible/client/keys.generated.go

goroutine 1 [running]:
go.etcd.io/etcd/client.init.0()
    /home/benjamin/go/pkg/mod/go.etcd.io/[email protected]+incompatible/client/keys.generated.go:45 +0x104
FrozenDueToAge WaitingForInfo modules

Most helpful comment

github.com/ugorji/go/codec was moved into its own module in commit e253f1f20942.

So you really do have two copies of the package: if you want the version from github.com/ugorji/go v1.1.1, then you'll need to remove the one in github.com/ugorji/go/codec. (go get github.com/ugorji/go/codec@none should do the trick.)

Please try that and let us know if you're still stuck.

All 9 comments

I guess is git project cannot named go keyword

I try to specify github.com/ugorji/go version to v1.1.1
but still not work
/home/benjamin/go/pkg/mod/go.etcd.io/[email protected]+incompatible/client/keys.generated.go:15:2: unknown import path "github.com/ugorji/go/codec": ambiguous import: found github.com/ugorji/go/codec in multiple modules:
github.com/ugorji/go v1.1.1 (/home/benjamin/go/pkg/mod/github.com/ugorji/[email protected]/codec)
github.com/ugorji/go/codec v0.0.0-20181209151446-772ced7fd4c2 (/home/benjamin/go/pkg/mod/github.com/ugorji/go/[email protected])

github.com/ugorji/go/codec was moved into its own module in commit e253f1f20942.

So you really do have two copies of the package: if you want the version from github.com/ugorji/go v1.1.1, then you'll need to remove the one in github.com/ugorji/go/codec. (go get github.com/ugorji/go/codec@none should do the trick.)

Please try that and let us know if you're still stuck.

awesome, go build was work
but when I try to invoke etcd.Client.GetVersion method, it will block

What do you mean by "it will block" ? Is it still an issue with Go ?

@agnivade
when I use the newest etcd it work well
but on my old server's etcd will block
work well etcd version:

$ ./etcd -version
etcd Version: 3.3.0+git
Git SHA: 9113019
Go Version: go1.11.4
Go OS/Arch: linux/amd64

will block etcd version:

$ ./etcd -version
etcd Version: 3.2.0-rc.0
Git SHA: 7e6d876
Go Version: go1.8.1
Go OS/Arch: linux/amd64

Sorry, I still do not understand what do you mean by "block" and how is this a Go issue ?

To clarify - your original issue was a versioning problem which got resolved. Now, from what I understand, this is a separate issue with etcd versions. Could you kindly clarify my questions ?

Thanks.

code in github gist
when I try to connect my old server etcd , and print it's Version, the client will block

"block" means the program does not quit itself

This sounds like an etcd issue rather than a Go bug. Have you tried filing a bug in the etcd repo ? In any case, this is a separate issue than the original bug.

If you think this is a Go bug, please open a new issue with more details which can point to somewhere in the core standard library or runtime. Like, dump a goroutine stack trace when its stuck.

Was this page helpful?
0 / 5 - 0 ratings