bolt
bolt copied to clipboard
bolt bench crashes
When I run: bolt bench -count=50000 -fill-percent=0.8 -read-mode=seq -write-mode=rnd-nest
I get a run time panic:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x8 pc=0x410e98]
goroutine 1 [running]:
panic(0x54c960, 0xc820012160)
/usr/local/go/src/runtime/panic.go:464 +0x3e6
main.(*BenchCommand).runReadsSequentialNested.func1.1(0x7f59e21e43b0, 0x8, 0x7fffffff, 0x7f59e21e43b8, 0x20, 0x7fffffff, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/cmd/bolt/main.go:1183 +0x78
github.com/boltdb/bolt.(*Bucket).ForEach(0xc8200742c0, 0xc8200438e8, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/bucket.go:361 +0x175
main.(*BenchCommand).runReadsSequentialNested.func1(0xc8200ac0e0, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/cmd/bolt/main.go:1182 +0xdc
github.com/boltdb/bolt.(*DB).View(0xc8200a4000, 0xc8200439b0, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/db.go:604 +0xb9
main.(*BenchCommand).runReadsSequentialNested(0xc820043e18, 0xc8200a4000, 0xc8200a0000, 0xc820043ae0, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/cmd/bolt/main.go:1208 +0x53
main.(*BenchCommand).runReads(0xc820043e18, 0xc8200a4000, 0xc8200a0000, 0xc820043ae0, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/cmd/bolt/main.go:1125 +0x1d7
main.(*BenchCommand).Run(0xc820043e18, 0xc820076080, 0x4, 0x4, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/cmd/bolt/main.go:927 +0x472
main.(*Main).Run(0xc820043f18, 0xc820076070, 0x5, 0x5, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/cmd/bolt/main.go:102 +0x936
main.main()
/home/hippo/goprojects/src/github.com/boltdb/bolt/cmd/bolt/main.go:64 +0x15e
OS: Linux Platform: amd64
Let me know If you need more information.
@TheHippo Thanks, I see the same issue. It looks like there's an issue with the CLI tool reading back the data. I'll look into it.
can this issue be closed if it is fixed?
No, I still get:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x8 pc=0x410f58]
goroutine 1 [running]:
panic(0x54dae0, 0xc820012170)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
main.(*BenchCommand).runReadsSequentialNested.func1.1(0x7fb6ba2d03b0, 0x8, 0x8, 0x7fb6ba2d03b8, 0x20, 0x20, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/cmd/bolt/main.go:1183 +0x78
github.com/boltdb/bolt.(*Bucket).ForEach(0xc82008c340, 0xc8200438e8, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/bucket.go:361 +0x175
main.(*BenchCommand).runReadsSequentialNested.func1(0xc8200960e0, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/cmd/bolt/main.go:1182 +0x109
github.com/boltdb/bolt.(*DB).View(0xc820082000, 0xc8200439b0, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/db.go:626 +0xb9
main.(*BenchCommand).runReadsSequentialNested(0xc820043e18, 0xc820082000, 0xc820078000, 0xc820043ae0, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/cmd/bolt/main.go:1208 +0x64
main.(*BenchCommand).runReads(0xc820043e18, 0xc820082000, 0xc820078000, 0xc820043ae0, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/cmd/bolt/main.go:1125 +0x1d7
main.(*BenchCommand).Run(0xc820043e18, 0xc82000a0e0, 0x4, 0x4, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/cmd/bolt/main.go:927 +0x472
main.(*Main).Run(0xc820043f18, 0xc82000a0d0, 0x5, 0x5, 0x0, 0x0)
/home/hippo/goprojects/src/github.com/boltdb/bolt/cmd/bolt/main.go:102 +0x936
main.main()
/home/hippo/goprojects/src/github.com/boltdb/bolt/cmd/bolt/main.go:64 +0x15e