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: panic while running go mod tidy #27124

Closed
shoenig opened this issue Aug 21, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@shoenig
Copy link
Contributor

commented Aug 21, 2018

Please answer these questions before submitting your issue. Thanks!

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

$ go version
go version go1.11rc1 linux/amd64

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

$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/hoenig/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/hoenig/Documents/indeed-go"
GOPROXY=""
GORACE=""
GOROOT="/opt/google/go"
GOTMPDIR=""
GOTOOLDIR="/opt/google/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/hoenig/Documents/indeed-go/src/indeed/gophers/3rdparty/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-build507642769=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Ran go mod tidy. It crashed with:

$ go mod tidy
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
cmd/go/internal/modload.(*mvsReqs).required(0xc0002ae1c0, 0xc000284c80, 0x17, 0x0, 0x0, 0xc0001314f8, 0x40f639, 0x8e8b40, 0xc0002aa278, 0xc000131598)
	/usr/local/go/src/cmd/go/internal/modload/load.go:835 +0x1232
cmd/go/internal/modload.(*mvsReqs).Required.func1(0xc000118444, 0x913fe0)
	/usr/local/go/src/cmd/go/internal/modload/load.go:765 +0x83
cmd/go/internal/par.(*Cache).Do(0xc0002ae1d8, 0x913fe0, 0xc000118420, 0xc000131708, 0xc0001318d0, 0xc000131810)
	/usr/local/go/src/cmd/go/internal/par/work.go:128 +0xd6
cmd/go/internal/modload.(*mvsReqs).Required(0xc0002ae1c0, 0xc000284c80, 0x17, 0x0, 0x0, 0xc0002ae1c0, 0x70, 0x68, 0x925c60, 0x0)
	/usr/local/go/src/cmd/go/internal/modload/load.go:764 +0x10f
cmd/go/internal/modcmd.modTidyGoSum.func1(0xc000284c80, 0x17, 0x0, 0x0)
	/usr/local/go/src/cmd/go/internal/modcmd/tidy.go:80 +0x10b
cmd/go/internal/modcmd.modTidyGoSum()
	/usr/local/go/src/cmd/go/internal/modcmd/tidy.go:87 +0x164
cmd/go/internal/modcmd.runTidy(0xd56020, 0xc0000a6080, 0x0, 0x0)
	/usr/local/go/src/cmd/go/internal/modcmd/tidy.go:66 +0x513
main.main()
	/usr/local/go/src/cmd/go/main.go:218 +0x7d4
@hajimehoshi

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2018

I encountered the same error, I couldn't make a minimized case though.

@agnivade

This comment has been minimized.

Copy link
Member

commented Aug 21, 2018

Duplicate of #27066. Fixed on tip.

@agnivade agnivade closed this Aug 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.