golang / dep

Go dependency management tool experiment (deprecated)
https://golang.github.io/dep/
BSD 3-Clause "New" or "Revised" License
12.87k stars 1.05k forks source link

panic: assertion failed: expected leaf node #2206

Closed veqryn closed 3 years ago

veqryn commented 4 years ago

What version of dep are you using (dep version)?

latest version of master branch as of today

dep:
 version     : devel
 build date  :
 git hash    :
 go version  : go1.11.4
 go compiler : gc
 platform    : linux/amd64
 features    : ImportDuringSolve=false

What dep command did you run?

dep ensure

What did you expect to see?

it works

What did you see instead?


panic: assertion failed: expected leaf node

goroutine 50 [running]:
github.com/golang/dep/vendor/github.com/boltdb/bolt._assert(0xc0008c2800, 0x9bc0a0, 0x12, 0x0, 0x0, 0x0)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/vendor/github.com/boltdb/bolt/db.go:1029 +0xf6
github.com/golang/dep/vendor/github.com/boltdb/bolt.(*Cursor).node(0xc000065b48, 0xc000726ee0)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/vendor/github.com/boltdb/bolt/cursor.go:375 +0x192
github.com/golang/dep/vendor/github.com/boltdb/bolt.(*Bucket).CreateBucket(0xc0008c28d8, 0xc000726ee0, 0x1e, 0x20, 0xc0003a8f90, 0xdf9a88, 0xc0008c28c0)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/vendor/github.com/boltdb/bolt/bucket.go:192 +0x349
github.com/golang/dep/vendor/github.com/boltdb/bolt.(*Bucket).CreateBucketIfNotExists(0xc0008c28d8, 0xc000726ee0, 0x1e, 0x20, 0xc000065cd8, 0x0, 0x0)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/vendor/github.com/boltdb/bolt/bucket.go:206 +0x4d
github.com/golang/dep/vendor/github.com/boltdb/bolt.(*Tx).CreateBucketIfNotExists(0xc0008c28c0, 0xc000726ee0, 0x1e, 0x20, 0xfffffffffffffffe, 0xc0001cf620, 0xc0008c28c0)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/vendor/github.com/boltdb/bolt/tx.go:115 +0x4f
github.com/golang/dep/gps.(*singleSourceCacheBolt).updateSourceBucket.func1(0xc0008c28c0, 0x9dc858, 0xc0008c28c0)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/gps/source_cache_bolt.go:502 +0x62
github.com/golang/dep/vendor/github.com/boltdb/bolt.(*DB).Update(0xc0001cf4a0, 0xc00085a980, 0x0, 0x0)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/vendor/github.com/boltdb/bolt/db.go:598 +0x90
github.com/golang/dep/vendor/github.com/boltdb/bolt.(*DB).Batch(0xc0001cf4a0, 0xc00085a980, 0x40e401, 0xc00085a960)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/vendor/github.com/boltdb/bolt/db.go:680 +0x25a
github.com/golang/dep/gps.(*singleSourceCacheBolt).updateSourceBucket(0xc0007b01e0, 0xc00085a960, 0x7da101, 0xc0003a0c00)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/gps/source_cache_bolt.go:501 +0x6f
github.com/golang/dep/gps.(*singleSourceCacheBolt).updateRevBucket(0xc0007b01e0, 0xc0003bf590, 0x28, 0xc0003a0c00, 0xc000470ed0, 0x42fda3)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/gps/source_cache_bolt.go:523 +0x77
github.com/golang/dep/gps.(*singleSourceCacheBolt).setManifestAndLock(0xc0007b01e0, 0xc0003bf590, 0x28, 0x9b5f85, 0x3, 0x1, 0xa61b20, 0x0, 0x0, 0x0)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/gps/source_cache_bolt.go:113 +0xf9
github.com/golang/dep/gps.(*singleSourceMultiCache).setManifestAndLock.func1()
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/gps/source_cache_multi.go:73 +0x84
github.com/golang/dep/gps.(*multiCache).processAsync(0xc0003d0a20)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/gps/source_cache_multi.go:35 +0x49
created by github.com/golang/dep/gps.newMultiCache
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/gps/source_cache_multi.go:29 +0xe9```
veqryn commented 4 years ago

After deleting my $GOPATH/pkg directory, I now get:

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

goroutine 4 [running]:
github.com/golang/dep/vendor/github.com/boltdb/bolt.(*Bucket).CreateBucket(0x0, 0xc00050c030, 0x29, 0x29, 0xc00069cc38, 0x444d97, 0x30)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/vendor/github.com/boltdb/bolt/bucket.go:162 +0x3a
github.com/golang/dep/vendor/github.com/boltdb/bolt.(*Bucket).CreateBucketIfNotExists(0x0, 0xc00050c030, 0x29, 0x29, 0x29, 0x29, 0x20)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/vendor/github.com/boltdb/bolt/bucket.go:206 +0x4d
github.com/golang/dep/gps.(*singleSourceCacheBolt).updateRevBucket.func1(0x0, 0xc000259160, 0x1e)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/gps/source_cache_bolt.go:525 +0xe2
github.com/golang/dep/gps.(*singleSourceCacheBolt).updateSourceBucket.func1(0xc0003ba620, 0x9dc858, 0xc0003ba620)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/gps/source_cache_bolt.go:506 +0x13c
github.com/golang/dep/vendor/github.com/boltdb/bolt.(*DB).Update(0xc0003dd4a0, 0xc0003760a0, 0x0, 0x0)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/vendor/github.com/boltdb/bolt/db.go:598 +0x90
github.com/golang/dep/vendor/github.com/boltdb/bolt.(*DB).Batch(0xc0003dd4a0, 0xc0003760a0, 0x1, 0xc000376080)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/vendor/github.com/boltdb/bolt/db.go:680 +0x25a
github.com/golang/dep/gps.(*singleSourceCacheBolt).updateSourceBucket(0xc0007766e0, 0xc000376080, 0x42fd01, 0xc000376060)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/gps/source_cache_bolt.go:501 +0x6f
github.com/golang/dep/gps.(*singleSourceCacheBolt).updateRevBucket(0xc0007766e0, 0xc00065f830, 0x28, 0xc000376060, 0x170d, 0x3)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/gps/source_cache_bolt.go:523 +0x77
github.com/golang/dep/gps.(*singleSourceCacheBolt).setPackageTree(0xc0007766e0, 0xc00065f830, 0x28, 0xc00025e1e0, 0x1e, 0xc0003a4240)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/gps/source_cache_bolt.go:195 +0xaf
github.com/golang/dep/gps.(*singleSourceMultiCache).setPackageTree.func1()
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/gps/source_cache_multi.go:93 +0x60
github.com/golang/dep/gps.(*multiCache).processAsync(0xc0001a9aa0)
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/gps/source_cache_multi.go:35 +0x49
created by github.com/golang/dep/gps.newMultiCache
        /c/Users/cduncan/workspace/go/src/github.com/golang/dep/gps/source_cache_multi.go:29 +0xe9
mvdan commented 3 years ago

Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks!