br0xen/boltbrowser

Large bolt database cant delete bucket

tomaswallentinus opened this issue · 3 comments

Hi.

I have a database with a bucket of 816 large pairs but when i try to delete it boltbrowser shuts down with the resulting error:

panic: page 3278 already freed

goroutine 1 [running]:
github.com/boltdb/bolt.(*freelist).free(0xc0000ea090, 0xb999, 0x7f5b16891000)
/home/admin/bolt/src/github.com/boltdb/bolt/freelist.go:121 +0x2a6
github.com/boltdb/bolt.(*Bucket).free.func1(0x7f5b16891000, 0x0, 0x2)
/home/admin/bolt/src/github.com/boltdb/bolt/bucket.go:684 +0x51
github.com/boltdb/bolt.(*Bucket)._forEachPageNode(0xc00004c340, 0xcce, 0x2, 0xc00006d9e0)
/home/admin/bolt/src/github.com/boltdb/bolt/bucket.go:506 +0x87
github.com/boltdb/bolt.(*Bucket)._forEachPageNode(0xc00004c340, 0x5f, 0x1, 0xc00006d9e0)
/home/admin/bolt/src/github.com/boltdb/bolt/bucket.go:513 +0xe6
github.com/boltdb/bolt.(*Bucket)._forEachPageNode(0xc00004c340, 0x15b, 0x0, 0xc00006d9e0)
/home/admin/bolt/src/github.com/boltdb/bolt/bucket.go:513 +0xe6
github.com/boltdb/bolt.(*Bucket).forEachPageNode(0xc00004c340, 0xc00006d9e0)
/home/admin/bolt/src/github.com/boltdb/bolt/bucket.go:499 +0x72
github.com/boltdb/bolt.(*Bucket).free(0xc00004c340)
/home/admin/bolt/src/github.com/boltdb/bolt/bucket.go:682 +0x67
github.com/boltdb/bolt.(*Bucket).DeleteBucket(0xc0000102b8, 0xc00006dbb0, 0x12, 0x20, 0x12, 0x20)
/home/admin/bolt/src/github.com/boltdb/bolt/bucket.go:255 +0x27e
github.com/boltdb/bolt.(*Tx).DeleteBucket(...)
/home/admin/bolt/src/github.com/boltdb/bolt/tx.go:121
main.deleteKey.func1(0xc0000102a0, 0x540a68, 0xc0000102a0)
/home/admin/bolt/src/github.com/br0xen/boltbrowser/bolt_model.go:375 +0x444
github.com/boltdb/bolt.(*DB).Update(0xc0000ec000, 0xc00006dc60, 0x0, 0x0)
/home/admin/bolt/src/github.com/boltdb/bolt/db.go:598 +0x90
main.deleteKey(0xc005882050, 0x1, 0x1, 0x1, 0xc00587e2d0)
/home/admin/bolt/src/github.com/br0xen/boltbrowser/bolt_model.go:370 +0xd5
main.(*BrowserScreen).handleDeleteKeyEvent(0xc00585e000, 0x7900000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0)
/home/admin/bolt/src/github.com/br0xen/boltbrowser/screen_browser.go:263 +0x1d2
main.(*BrowserScreen).handleKeyEvent(0xc00585e000, 0x7900000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0)
/home/admin/bolt/src/github.com/br0xen/boltbrowser/screen_browser.go:84 +0x119
main.mainLoop(0xc00013e080, 0x3000100080001, 0xc000030001)
/home/admin/bolt/src/github.com/br0xen/boltbrowser/mainloop.go:25 +0x22d
main.main()
/home/admin/bolt/src/github.com/br0xen/boltbrowser/main.go:133 +0x30e

Oh my, ok. Well, I guess I've never worked with a DB that was large enough to run into something like that. I'll try to find time to look into it, but it honestly looks like it's an issue with boltdb, since that's where the error is thrown...

Okey :) I see the error is already reported to the boltdb-page. So you can ignore it :)