Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Panic (maybe a race?) when init on kops #250

Closed
krisnova opened this issue Feb 16, 2017 · 6 comments · Fixed by #361
Closed

Panic (maybe a race?) when init on kops #250

krisnova opened this issue Feb 16, 2017 · 6 comments · Fixed by #361
Labels

Comments

@krisnova
Copy link
Contributor

Trying to play with dep + kops (again) today!

Anyway just hit this weird panic where I had to manually remove the lockfile to try again. (Note, that dep init worked on the second try!)


kris-nova:kops kris$ dep init
Cached github.com/golang/glog
Cached github.com/kr/pty
Cached github.com/spf13/pflag
Cached github.com/docker/engine-api
Cached github.com/blang/semver
Cached github.com/gucumber/gucumber
Cached github.com/docker/libnetwork
Cached k8s.io/gengo
Cached github.com/opencontainers/runc
Cached k8s.io/client-go
Cached github.com/gogo/protobuf
Cached github.com/google/cadvisor
Cached github.com/coreos/rkt
Cached github.com/aws/aws-sdk-go
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0xda270]

goroutine 181 [running]:
panic(0x3a6380, 0xc4200100d0)
	/usr/local/Cellar/go/1.7.5/libexec/src/runtime/panic.go:500 +0x1a1
github.com/golang/dep/vendor/github.com/sdboyer/gps.(*SourceMgr).SyncSourceFor(0xc42008e000, 0xc4206f80c0, 0x13, 0x0, 0x0, 0x0, 0x0)
	/go/src/github.com/golang/dep/vendor/github.com/sdboyer/gps/source_manager.go:461 +0x180
main.getProjectData.func1(0xc4206f80c0, 0x13, 0xc42008e000)
	/go/src/github.com/golang/dep/cmd/dep/init.go:244 +0x6c
created by main.getProjectData
	/go/src/github.com/golang/dep/cmd/dep/init.go:279 +0xdf3
kris-nova:kops kris$ dep init
getSourceManager: cache lock file /go/pkg/dep/sm.lock exists - another process crashed or is still running?
kris-nova:kops kris$ rm -rf /go/pkg/dep/sm.lock 
kris-nova:kops kris$ dep init

# Working init logs here

@sdboyer
Copy link
Member

sdboyer commented Feb 18, 2017

Hmm, this must be an oversight in how we modified dep init to prefetch information in #194. Looks like some version of use-after-free...

@davecheney
Copy link
Contributor

davecheney commented Feb 19, 2017 via email

@sdboyer sdboyer added the bug label Feb 20, 2017
@sdboyer
Copy link
Member

sdboyer commented Feb 20, 2017

#254 is a dupe of this, but it shows the underlying problem isn't the changes we made in init - there's a bug in gps.

@sdboyer
Copy link
Member

sdboyer commented Feb 20, 2017

Lock files on disk :(

@davecheney agree 😢 suggestions welcome! (in another issue - should actually be a gps issue)

@sdboyer
Copy link
Member

sdboyer commented Mar 10, 2017

Should be fixed upstream - variable shadowing issue. sdboyer/gps#187

@doxxx
Copy link

doxxx commented Mar 11, 2017

I just tested the sdboyer/gps#187 fix by running dep ensure -update github.com/sdboyer/gps in my $GOPATH/src/github.com/golang/dep folder and then go install. After that I was able to use dep init and various dep ensure commands on a project which prior to this was causing this panic every time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants