Skip to content
This repository was archived by the owner on Mar 9, 2019. It is now read-only.

bolt bench crashes #543

Open
TheHippo opened this issue Mar 24, 2016 · 3 comments
Open

bolt bench crashes #543

TheHippo opened this issue Mar 24, 2016 · 3 comments

Comments

@TheHippo
Copy link

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.

@benbjohnson
Copy link
Member

@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.

ufoot pushed a commit to ufoot/bolt that referenced this issue Apr 13, 2016
Added a test to check that bucket is actually non-nil before getting a
cursor on it. This happens when querying non-bucket entries, the
Bucket() method does not return explicit errors, so we can guess it's
probably because it's a key of the wrong type (ie: not leaf). No clear
idea wether the results in the case described '-read-mode=seq
-write-mode=rnd-nest' really do make sense, it looks like read are
zero whatsoever.
@andrewchambers
Copy link

can this issue be closed if it is fixed?

@TheHippo
Copy link
Author

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

heyitsanthony pushed a commit to heyitsanthony/bolt that referenced this issue Aug 11, 2017
Added a test to check that bucket is actually non-nil before getting a
cursor on it. This happens when querying non-bucket entries, the
Bucket() method does not return explicit errors, so we can guess it's
probably because it's a key of the wrong type (ie: not leaf). No clear
idea wether the results in the case described '-read-mode=seq
-write-mode=rnd-nest' really do make sense, it looks like read are
zero whatsoever.
heyitsanthony referenced this issue in etcd-io/bbolt Aug 11, 2017
Fix issue #543 'bolt bench crashes'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants