br0xen / boltbrowser

A CLI Browser for BoltDB Files
GNU General Public License v3.0
631 stars 91 forks source link

Update bbolt version to go.etcd.io/bbolt #61

Open zhaojizhuang opened 1 year ago

zhaojizhuang commented 1 year ago

panic when browse containerd 1.17.1‘s metadata

panic: runtime error: index out of range [18446744073709547520] with length 281474976710655

goroutine 1 [running]:
github.com/boltdb/bolt.(*DB).page(...)
    /data00/code/pkg/mod/github.com/boltdb/bolt@v1.3.1/db.go:796
github.com/boltdb/bolt.Open({0x7ffd572e0544, 0x3a}, 0x48690?, 0xc00008de60)
    /data00/code/pkg/mod/github.com/boltdb/bolt@v1.3.1/db.go:237 +0x545
main.main()
    /data00/code/pkg/mod/github.com/br0xen/boltbrowser@v0.0.0-20230515124937-7a5543df994e/main.go:117 +0x1bc
root@n37-006-180:~# boltbrowser /var/lib/containerd/io.containerd.metadata.v1.bolt/meta.db
panic: runtime error: index out of range [18446744073709547520] with length 281474976710655

goroutine 1 [running]:
github.com/boltdb/bolt.(*DB).page(...)
    /data00/code/pkg/mod/github.com/boltdb/bolt@v1.3.1/db.go:796
github.com/boltdb/bolt.Open({0x7ffc1e7f2544, 0x3a}, 0x48690?, 0xc000059e60)
    /data00/code/pkg/mod/github.com/boltdb/bolt@v1.3.1/db.go:237 +0x545
main.main()
    /data00/code/pkg/mod/github.com/br0xen/boltbrowser@v0.0.0-20230515124937-7a5543df994e/main.go:117 +0x1bc

Maybe we should update bolt version

Due to:

And etcd bbolt is a fork of Ben Johnson's Bolt key/value store. The purpose of this fork is to provide the Go community with an active maintenance and development target for Bolt; the goal is improved reliability and stability. bbolt includes bug fixes, performance enhancements, and features not found in Bolt while preserving backwards compatibility with the Bolt API. see https://github.com/etcd-io/bbolt#bbolt

zhaojizhuang commented 1 year ago

cc @br0xen