Skip to content

tool/vet: panic with go 1.7.1 . #17072

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
hackintoshrao opened this issue Sep 12, 2016 · 3 comments
Closed

tool/vet: panic with go 1.7.1 . #17072

hackintoshrao opened this issue Sep 12, 2016 · 3 comments

Comments

@hackintoshrao
Copy link

hackintoshrao commented Sep 12, 2016

This issue was not seen in Go 1.6 .

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

go version go1.7.1 darwin/amd64

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/hackintoshrao/mycode/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

What did you do?

The details are provided here minio/minio#2675 .

Simple way to reproduce.

  • go get github.com/minio/mino
  • cd $GOPATH/src/github.com/minio/minio
  • go tool vet -all ./cmd

What did you expect to see?

go vet to end gracefully.

What did you see instead?

panic: inconsistent import:
    func strings.HasPrefix(s string, prefix string) bool
previously imported as:
    func strings.HasPrefix(s string, prefix string) bool
 [recovered]
    panic: inconsistent import:
    func strings.HasPrefix(s string, prefix string) bool
previously imported as:
    func strings.HasPrefix(s string, prefix string) bool


goroutine 1 [running]:
panic(0x2734e0, 0xc4206fdc00)
    /usr/local/go/src/runtime/panic.go:500 +0x1a1
go/types.(*Checker).handleBailout(0xc4200c81c0, 0xc420eaf578)
    /usr/local/go/src/go/types/check.go:213 +0xae
panic(0x2734e0, 0xc4206fdc00)
    /usr/local/go/src/runtime/panic.go:458 +0x243
go/internal/gcimporter.(*importer).declare(0xc42023b520, 0x3f4180, 0xc420e18b90)
    /usr/local/go/src/go/internal/gcimporter/bimport.go:175 +0x17c
go/internal/gcimporter.(*importer).obj(0xc42023b520, 0xfffffffffffffffb)
    /usr/local/go/src/go/internal/gcimporter/bimport.go:203 +0x4a2
go/internal/gcimporter.BImportData(0xc42006ef30, 0xc420e38000, 0x19389, 0x1fe00, 0xc4203c3c88, 0x7, 0x0, 0x7, 0x0, 0x0)
    /usr/local/go/src/go/internal/gcimporter/bimport.go:88 +0x390
go/internal/gcimporter.Import(0xc42006ef30, 0xc4203c3c88, 0x7, 0xc420331440, 0x3, 0xc4218f53b0, 0x0, 0x0)
    /usr/local/go/src/go/internal/gcimporter/gcimporter.go:166 +0x551
go/importer.gcimports.ImportFrom(0xc42006ef30, 0xc4203c3c88, 0x7, 0xc420331440, 0x3, 0x0, 0xc420b755e0, 0x0, 0x0)
    /usr/local/go/src/go/importer/importer.go:70 +0x67
go/types.(*Checker).collectObjects(0xc4200c81c0)
    /usr/local/go/src/go/types/resolver.go:191 +0x826
go/types.(*Checker).checkFiles(0xc4200c81c0, 0xc42083a800, 0xb5, 0x100, 0x0, 0x0)
    /usr/local/go/src/go/types/check.go:225 +0xaa
go/types.(*Checker).Files(0xc4200c81c0, 0xc42083a800, 0xb5, 0x100, 0xc420dbd020, 0xc4202ab600)
    /usr/local/go/src/go/types/check.go:218 +0x49
go/types.(*Config).Check(0xc420dc2f00, 0xc4203151d0, 0x3, 0xc42033e300, 0xc42083a800, 0xb5, 0x100, 0xc420dc6320, 0x0, 0xc4200001a0, ...)
    /usr/local/go/src/go/types/api.go:344 +0x1a3
main.(*Package).check(0xc420c3b9e0, 0xc42033e300, 0xc42083a800, 0xb5, 0x100, 0x0, 0xc420d99a80)
    /usr/local/go/src/cmd/vet/types.go:76 +0x370
main.doPackage(0x7fff5fbffb05, 0x5, 0xc420343000, 0xb5, 0x100, 0x0, 0x0)
    /usr/local/go/src/cmd/vet/main.go:336 +0x999
main.doPackageDir(0x7fff5fbffb05, 0x5)
    /usr/local/go/src/cmd/vet/main.go:284 +0x606
main.visit(0x7fff5fbffb05, 0x5, 0x3f34a0, 0xc4200dbe10, 0x0, 0x0, 0x0, 0x0)
    /usr/local/go/src/cmd/vet/main.go:371 +0xf3
path/filepath.walk(0x7fff5fbffb05, 0x5, 0x3f34a0, 0xc4200dbe10, 0x2f5990, 0x0, 0xc4200dbd40)
    /usr/local/go/src/path/filepath/path.go:351 +0x81
path/filepath.Walk(0x7fff5fbffb05, 0x5, 0x2f5990, 0xc, 0xc4200dbd40)
    /usr/local/go/src/path/filepath/path.go:398 +0xd5
main.walkDir(0x7fff5fbffb05, 0x5)
    /usr/local/go/src/cmd/vet/main.go:386 +0x41
main.main()
    /usr/local/go/src/cmd/vet/main.go:240 +0x2cb

@dgryski
Copy link
Contributor

dgryski commented Sep 12, 2016

Please clean out your pkg directory and rebuild.

Full story: https://groups.google.com/forum/#!topic/golang-dev/kkVa_W1IenE

@robpike
Copy link
Contributor

robpike commented Sep 12, 2016

Duplicate of #16680

@robpike robpike closed this as completed Sep 12, 2016
@hackintoshrao
Copy link
Author

Thank you @dgryski .

@golang golang locked and limited conversation to collaborators Sep 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants