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

Invalid memory address or nil pointer dereference when running dep ensure #1022

Closed
sorcix opened this issue Aug 17, 2017 · 3 comments · Fixed by #1026
Closed

Invalid memory address or nil pointer dereference when running dep ensure #1022

sorcix opened this issue Aug 17, 2017 · 3 comments · Fixed by #1026

Comments

@sorcix
Copy link

sorcix commented Aug 17, 2017

What version of Go and dep are you using?

  • go go1.9rc2 linux/amd64
  • dep v0.3.0-132-g2097d86

What dep command did you run?

dep ensure

What did you expect to see?

No errors

What did you see instead?

dep ensure
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x75a336]

goroutine 75 [running]:
github.com/golang/dep/internal/gps.stripVendor(0xc42019aff0, 0x46, 0x0, 0x0, 0xb06fa0, 0xc4203502d0, 0xc420619d58, 0xc420294001)
	/go/src/github.com/golang/dep/internal/gps/strip_vendor.go:12 +0x26
path/filepath.Walk(0xc42019aff0, 0x46, 0x8f5a48, 0x13, 0xc420619d78)
	/usr/local/go/src/path/filepath/path.go:401 +0x76
github.com/golang/dep/internal/gps.WriteDepTree.func1(0xc420168460, 0x18, 0xc42031abe0, 0xb0f480, 0xc42005b860, 0xc42024a120, 0x446501, 0xc4204b8160, 0xc4201ccb40, 0x2d, ...)
	/go/src/github.com/golang/dep/internal/gps/result.go:82 +0x44b
created by github.com/golang/dep/internal/gps.WriteDepTree
	/go/src/github.com/golang/dep/internal/gps/result.go:73 +0x242

My Gopkg.toml:

[[constraint]]                                                                                                                                                                                                                              
  name = "my-private-gitlab.com/group/project"
  branch = "master"
  source = "ssh://[email protected]/group/project.git"

[[constraint]]
  name = "github.com/urfave/cli"
@sdboyer
Copy link
Member

sdboyer commented Aug 17, 2017

hi, thanks for the bug report, and sorry about that 😢

@ibrasho i'm gonna guess this is is a product of parallelizing writes

@ibrasho
Copy link
Collaborator

ibrasho commented Aug 17, 2017

@sdboyer I think I fixed this in #1020 (check this).

If the initial os.Lstat fail, the os.FileInfo param will be nil. I'm not sure why this started happening when parallelizing WriteDepTree but not when it was sequential?

@ashishtiwari1993
Copy link

@sdboyer facing same issue. Check here https://stackoverflow.com/questions/48424609/lastinsertid-go-redis-library-gives-error . You guess right above it with parallelism, In which i am continuously inserting data in forever loop with 10 goroutines . Is there any solution ? I have latest go and mysql driver.

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

Successfully merging a pull request may close this issue.

4 participants