-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Description
Please answer these questions before submitting your issue. Thanks!
- What version of Go are you using (
go version
)?
go version go1.7 linux/amd64 - What operating system and processor architecture are you using (
go env
)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/chris/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build917801568=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1" - What did you do?
cd $GOPATH/src/github.com/prometheus/client_golang && go vet ./...
The client_golang hash: 25db0447498b30e85d2947c24d5f1d37979b56bd
However, this is bizarre because I then removed and reinstalled this repo with the same hash. Afterwards, warnings were printed as one would expect.
I think the particular package is a red herring. I also saw go vet panics against constabulary/gb, but reinstalling the repo (same version) made the panics disappear.
I don't understand why panics are consistent, and then disappear when I reinstall. I tried running 'touch' against all the files in these repos before removing things, but I still saw panics.
I can cat the files just fine, so I don't think I have crazy filesystem/disk problems.
I'd recommend running:
cd $GOPATH/src && go vet ./...
See if you notice any panics in your environment.
- What did you expect to see?
Nothing, or go vet warnings - What did you see instead?
panic: inconsistent import:
var io.ErrUnexpectedEOF error
previously imported as:
var ErrUnexpectedEOF error
[recovered]
panic: inconsistent import:
var io.ErrUnexpectedEOF error
previously imported as:
var ErrUnexpectedEOF error
goroutine 1 [running]:
panic(0x674b20, 0xc420326cb0)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
go/types.(_Checker).handleBailout(0xc4200b61c0, 0xc4203db8d8)
/usr/local/go/src/go/types/check.go:213 +0xae
panic(0x674b20, 0xc420326cb0)
/usr/local/go/src/runtime/panic.go:458 +0x243
go/internal/gcimporter.(_importer).declare(0xc4203aea90, 0x7f64a0, 0xc4204efb80)
/usr/local/go/src/go/internal/gcimporter/bimport.go:175 +0x17c
go/internal/gcimporter.(_importer).obj(0xc4203aea90, 0xfffffffffffffffc)
/usr/local/go/src/go/internal/gcimporter/bimport.go:195 +0x1b4
go/internal/gcimporter.BImportData(0xc420012ff0, 0xc420410000, 0x107a4, 0x1fe00, 0xc4201f35e9, 0x2, 0x0, 0x2, 0xc41ffe82af, 0x0)
/usr/local/go/src/go/internal/gcimporter/bimport.go:88 +0x390
go/internal/gcimporter.Import(0xc420012ff0, 0xc4201f35e9, 0x2, 0x7ffea37951ea, 0xa, 0xc42014e3c0, 0x0, 0x0)
/usr/local/go/src/go/internal/gcimporter/gcimporter.go:166 +0x551
go/importer.gcimports.ImportFrom(0xc420012ff0, 0xc4201f35e9, 0x2, 0x7ffea37951ea, 0xa, 0x0, 0xc420053810, 0x0, 0x0)
/usr/local/go/src/go/importer/importer.go:70 +0x67
go/types.(_Checker).collectObjects(0xc4200b61c0)
/usr/local/go/src/go/types/resolver.go:191 +0x826
go/types.(_Checker).checkFiles(0xc4200b61c0, 0xc4202fa600, 0x1b, 0x20, 0x0, 0x0)
/usr/local/go/src/go/types/check.go:225 +0xaa
go/types.(_Checker).Files(0xc4200b61c0, 0xc4202fa600, 0x1b, 0x20, 0xc420395680, 0xc4200c9960)
/usr/local/go/src/go/types/check.go:218 +0x49
go/types.(_Config).Check(0xc42039ea00, 0xc42000f9e0, 0xa, 0xc420019540, 0xc4202fa600, 0x1b, 0x20, 0xc42038bb80, 0x40, 0xc4200001a0, ...)
/usr/local/go/src/go/types/api.go:344 +0x1a3
main.(_Package).check(0xc420071920, 0xc420019540, 0xc4202fa600, 0x1b, 0x20, 0x0, 0xc420363280)
/usr/local/go/src/cmd/vet/types.go:76 +0x370
main.doPackage(0x6cf324, 0x1, 0xc42000a1d0, 0x1b, 0x1b, 0x0, 0x1)
/usr/local/go/src/cmd/vet/main.go:336 +0x999
main.main()
/usr/local/go/src/cmd/vet/main.go:244 +0x345
exit status 2
panic: inconsistent import:
func errors.New(text string) error
previously imported as:
func errors.New(text string) error
[recovered]
panic: inconsistent import:
func errors.New(text string) error
previously imported as:
func errors.New(text string) error
goroutine 1 [running]:
panic(0x674b20, 0xc420131110)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
go/types.(_Checker).handleBailout(0xc4200b41c0, 0xc4202078d8)
/usr/local/go/src/go/types/check.go:213 +0xae
panic(0x674b20, 0xc420131110)
/usr/local/go/src/runtime/panic.go:458 +0x243
go/internal/gcimporter.(_importer).declare(0xc420137930, 0x7f6180, 0xc420134b40)
/usr/local/go/src/go/internal/gcimporter/bimport.go:175 +0x17c
go/internal/gcimporter.(_importer).obj(0xc420137930, 0xfffffffffffffffb)
/usr/local/go/src/go/internal/gcimporter/bimport.go:203 +0x4a2
go/internal/gcimporter.BImportData(0xc42000b050, 0xc420139000, 0xb52, 0xe00, 0xc42015f079, 0x6, 0x0, 0x6, 0xc42012afc0, 0xc420207098)
/usr/local/go/src/go/internal/gcimporter/bimport.go:88 +0x390
go/internal/gcimporter.Import(0xc42000b050, 0xc42015f079, 0x6, 0x7ffc57888440, 0x13, 0xc4206f8960, 0x0, 0x0)
/usr/local/go/src/go/internal/gcimporter/gcimporter.go:166 +0x551
go/importer.gcimports.ImportFrom(0xc42000b050, 0xc42015f079, 0x6, 0x7ffc57888440, 0x13, 0x0, 0xc420178550, 0x0, 0x0)
/usr/local/go/src/go/importer/importer.go:70 +0x67
go/types.(_Checker).collectObjects(0xc4200b41c0)
/usr/local/go/src/go/types/resolver.go:191 +0x826
go/types.(_Checker).checkFiles(0xc4200b41c0, 0xc4201761e0, 0x2, 0x2, 0x0, 0x0)
/usr/local/go/src/go/types/check.go:225 +0xaa
go/types.(_Checker).Files(0xc4200b41c0, 0xc4201761e0, 0x2, 0x2, 0xc42016b1d0, 0xc4200c7960)
/usr/local/go/src/go/types/check.go:218 +0x49
go/types.(_Config).Check(0xc420170ec0, 0xc42000f9d8, 0x8, 0xc420017540, 0xc4201761e0, 0x2, 0x2, 0xc420178050, 0x80, 0xc4200001a0, ...)
/usr/local/go/src/go/types/api.go:344 +0x1a3
main.(_Package).check(0xc42006e840, 0xc420017540, 0xc4201761e0, 0x2, 0x2, 0xc4201761f0, 0x1)
/usr/local/go/src/cmd/vet/types.go:76 +0x370
main.doPackage(0x6cf324, 0x1, 0xc42000a2e0, 0x2, 0x2, 0x0, 0x1)
/usr/local/go/src/cmd/vet/main.go:336 +0x999
main.main()
/usr/local/go/src/cmd/vet/main.go:244 +0x345
exit status 2