NebulousLabs / Sia

Blockchain-based marketplace for file storage. Project has moved to GitLab: https://gitlab.com/NebulousLabs/Sia
https://sia.tech
MIT License
2.71k stars 440 forks source link

bolt: invalid page type: 0: 0 #2247

Open SAKEoh opened 7 years ago

SAKEoh commented 7 years ago

Error Log:

Loading... (0/6) Loading siad... (1/6) Loading gateway... (2/6) Loading consensus... (3/6) Loading transaction pool... (4/6) Loading wallet... (5/6) Loading host... (6/6) Loading renter... Finished loading in 5.1462944 seconds panic: invalid page type: 0: 0

goroutine 5 [running]: github.com/NebulousLabs/bolt.(Cursor).search(0xc04d416940, 0xc04d416a00, 0x20, 0x20, 0x147005) /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:256 +0x40c github.com/NebulousLabs/bolt.(Cursor).searchPage(0xc04d416940, 0xc04d416a00, 0x20, 0x20, 0x11a302000) /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:314 +0x15d github.com/NebulousLabs/bolt.(Cursor).search(0xc04d416940, 0xc04d416a00, 0x20, 0x20, 0x9a312) /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:271 +0x1c2 github.com/NebulousLabs/bolt.(Cursor).searchNode(0xc04d416940, 0xc04d416a00, 0x20, 0x20, 0xc04703abd0) /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:291 +0x12b github.com/NebulousLabs/bolt.(Cursor).search(0xc04d416940, 0xc04d416a00, 0x20, 0x20, 0x6cc2) /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:268 +0x17d github.com/NebulousLabs/bolt.(Cursor).searchNode(0xc04d416940, 0xc04d416a00, 0x20, 0x20, 0xc04703ab60) /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:291 +0x12b github.com/NebulousLabs/bolt.(Cursor).search(0xc04d416940, 0xc04d416a00, 0x20, 0x20, 0x6cfd) /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:268 +0x17d github.com/NebulousLabs/bolt.(Cursor).seek(0xc04d416940, 0xc04d416a00, 0x20, 0x20, 0x0, 0x0, 0x1, 0x1cefae90e, 0x86c6, 0x86c6, ...) /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:159 +0xb8 github.com/NebulousLabs/bolt.(Bucket).Get(0xc042632f00, 0xc04d416a00, 0x20, 0x20, 0x1cefae90e, 0x86c6, 0x86c6) /home/luke/go/src/github.com/NebulousLabs/bolt/bucket.go:267 +0xf6 github.com/NebulousLabs/Sia/modules/consensus.(ConsensusSet).targetAdjustmentBase(0xc042131b80, 0xc042632f00, 0xc049b211e0, 0xa2af80) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/processedblock.go:70 +0x197 github.com/NebulousLabs/Sia/modules/consensus.(ConsensusSet).setChildTarget(0xc042131b80, 0xc042632f00, 0xc049b211e0) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/processedblock.go:117 +0x14c github.com/NebulousLabs/Sia/modules/consensus.(ConsensusSet).newChild(0xc042131b80, 0xc045e8d5e0, 0xc049b21080, 0x3700000000000000, 0x2819c5846bbeb482, 0x36dbf381bb209b02, 0x2c5febe286d17083, 0x4c24c21c, 0x5986a6e0, 0xc04823e380, ...) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/processedblock.go:145 +0x332 github.com/NebulousLabs/Sia/modules/consensus.(ConsensusSet).addBlockToTree(0xc042131b80, 0xc045e8d5e0, 0x3700000000000000, 0x2819c5846bbeb482, 0x36dbf381bb209b02, 0x2c5febe286d17083, 0x4c24c21c, 0x5986a6e0, 0xc04823e380, 0x1, ...) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/accept.go:151 +0xa3 github.com/NebulousLabs/Sia/modules/consensus.(ConsensusSet).managedAcceptBlocks.func1(0xc045e8d5e0, 0xb0b570, 0xc045e8d5e0) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/accept.go:262 +0x23a github.com/NebulousLabs/bolt.(DB).Update(0xc0420fe780, 0xc0443532e8, 0x0, 0x0) /home/luke/go/src/github.com/NebulousLabs/bolt/db.go:603 +0xa6 github.com/NebulousLabs/Sia/modules/consensus.(ConsensusSet).managedAcceptBlocks(0xc042131b80, 0xc047b6a000, 0xa, 0xa, 0x0, 0x0, 0x0) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/accept.go:283 +0x520 github.com/NebulousLabs/Sia/modules/consensus.(ConsensusSet).managedReceiveBlocks(0xc042131b80, 0xde41c0, 0xc045d20c00, 0x0, 0x0) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/synchronize.go:225 +0x5be github.com/NebulousLabs/Sia/modules/consensus.(ConsensusSet).(github.com/NebulousLabs/Sia/modules/consensus.managedReceiveBlocks)-fm(0xde41c0, 0xc045d20c00, 0x0, 0x0) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/synchronize.go:445 +0x45 github.com/NebulousLabs/Sia/modules/gateway.(Gateway).managedRPC(0xc04206cc60, 0xc04213acb0, 0x10, 0xaddb78, 0xa, 0xc048f92d90, 0x0, 0x0) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/gateway/rpc.go:66 +0x339 github.com/NebulousLabs/Sia/modules/gateway.(Gateway).RPC(0xc04206cc60, 0xc04213acb0, 0x10, 0xaddb78, 0xa, 0xc048f92d90, 0x0, 0x0) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/gateway/rpc.go:76 +0xd8 github.com/NebulousLabs/Sia/modules/consensus.(ConsensusSet).threadedInitialBlockchainDownload.func1(0xc042131b80, 0xc04d417ef0, 0xc04d417eb0, 0xc04d417eb8, 0x0, 0x0) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/synchronize.go:580 +0x133 github.com/NebulousLabs/Sia/modules/consensus.(ConsensusSet).threadedInitialBlockchainDownload(0xc042131b80, 0xc042260010, 0x87931a) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/synchronize.go:601 +0x30e github.com/NebulousLabs/Sia/modules/consensus.New.func1(0x1, 0xc0422a0e80, 0xc042131b80, 0xde4440, 0xc04206cc60) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/consensusset.go:151 +0x404 created by github.com/NebulousLabs/Sia/modules/consensus.New /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/consensusset.go:182 +0x641

HydraGene commented 7 years ago

Got the same error... https://pastebin.com/CCkPckVt *Pastebin because errorlog is very big..

tbenz9 commented 7 years ago

@lukechampine Between this issue and the ones linked it appears that quite a few people have run into this bug. It might be worth taking a closer look at. The referenced GH Issues have some useful log entries as well.

lukechampine commented 7 years ago

I'm fairly sure this is related to the other bolt problems. Hopefully, fixing the root cause will fix all of these symptoms.

tlightsky commented 7 years ago

meet this problem again, should i resync consensus again? @lukechampine

D:\s\sia-win>siad
Sia Daemon v1.3.1
Loading...
(0/6) Loading siad...
(1/6) Loading gateway...
(2/6) Loading consensus...
(3/6) Loading transaction pool...
panic: invalid page type: 0: 0

goroutine 13 [running]:
github.com/NebulousLabs/bolt.(*Cursor).search(0xc042af4388, 0xc044b7cf60, 0x20, 0x20, 0x9caa9)
        /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:256 +0x413
github.com/NebulousLabs/bolt.(*Cursor).searchNode(0xc042af4388, 0xc044b7cf60, 0x20, 0x20, 0xc042e18af0)
        /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:291 +0x127
github.com/NebulousLabs/bolt.(*Cursor).search(0xc042af4388, 0xc044b7cf60, 0x20, 0x20, 0x3245d)
        /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:268 +0x164
github.com/NebulousLabs/bolt.(*Cursor).searchNode(0xc042af4388, 0xc044b7cf60, 0x20, 0x20, 0xc042f52bd0)
        /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:291 +0x127
github.com/NebulousLabs/bolt.(*Cursor).search(0xc042af4388, 0xc044b7cf60, 0x20, 0x20, 0x4046a)
        /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:268 +0x164
github.com/NebulousLabs/bolt.(*Cursor).searchNode(0xc042af4388, 0xc044b7cf60, 0x20, 0x20, 0xc042e91f10)
        /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:291 +0x127
github.com/NebulousLabs/bolt.(*Cursor).search(0xc042af4388, 0xc044b7cf60, 0x20, 0x20, 0xb4c07)
        /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:268 +0x164
github.com/NebulousLabs/bolt.(*Cursor).seek(0xc042af4388, 0xc044b7cf60, 0x20, 0x20, 0x0, 0x0, 0xc043a33500, 0x99, 0x0, 0x0, ...)
        /home/luke/go/src/github.com/NebulousLabs/bolt/cursor.go:159 +0xb8
github.com/NebulousLabs/bolt.(*Bucket).Put(0xc042e1bac0, 0xc044b7cf60, 0x20, 0x20, 0xc04456e728, 0x34, 0x40, 0x0, 0xf392f8)
        /home/luke/go/src/github.com/NebulousLabs/bolt/bucket.go:300 +0x141
github.com/NebulousLabs/Sia/modules/consensus.addSiacoinOutput(0xc04228aee0, 0x2b2ba86c8fd49d6b, 0x1b1d82370640c8c9, 0x486188f29e27ea33, 0x63560c5a49bea5df, 0x0, 0xc042b238c0, 0x2, 0x6, 0xd4a52bbb0d28783b, ...)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/consensusdb.go:312 +0x14b
github.com/NebulousLabs/Sia/modules/consensus.commitSiacoinOutputDiff(0xc04228aee0, 0x2ba86c8fd49d6b01, 0x1d82370640c8c92b, 0x6188f29e27ea331b, 0x560c5a49bea5df48, 0x63, 0x0, 0xc042b238c0, 0x2, 0x6, ...)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/diffs.go:58 +0x8a
github.com/NebulousLabs/Sia/modules/consensus.applySiacoinOutputs(0xc04228aee0, 0xc0421894a0, 0xc042b1be00, 0x1, 0x1, 0xc042b26c00, 0x2, 0x2, 0xf392f8, 0x0, ...)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/applytransaction.go:45 +0xa8
github.com/NebulousLabs/Sia/modules/consensus.applyTransaction(0xc04228aee0, 0xc0421894a0, 0xc042b1be00, 0x1, 0x1, 0xc042b26c00, 0x2, 0x2, 0xf392f8, 0x0, ...)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/applytransaction.go:208 +0xc0
github.com/NebulousLabs/Sia/modules/consensus.generateAndApplyDiff(0xc04228aee0, 0xc0421894a0, 0xc0421742f0, 0x2)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/diffs.go:224 +0xdc
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).applyUntilBlock(0xc042288000, 0xc04228aee0, 0xc0421894a0, 0x0, 0x0, 0x0, 0x6402000000000000, 0xff74ecaa256e024c)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/fork.go:84 +0x228
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).forkBlockchain(0xc042288000, 0xc04228aee0, 0xc0421894a0, 0xb00000000000000, 0x96f167c06595011b, 0xd38d5eea56f0d814, 0x3e4d2868aa99884, 0x50410fd9005123b3, 0x59d26a63, 0xc0422cfa80, ...)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/fork.go:111 +0xb3
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).addBlockToTree(0xc042288000, 0xc04228aee0, 0xb00000000000000, 0x96f167c06595011b, 0xd38d5eea56f0d814, 0x3e4d2868aa99884, 0x50410fd9005123b3, 0x59d26a63, 0xc0422cfa80, 0x1, ...)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/accept.go:164 +0x10d
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).managedAcceptBlocks.func1(0xc04228aee0, 0xaf4c20, 0xc04228aee0)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/accept.go:262 +0x2b0
github.com/NebulousLabs/bolt.(*DB).Update(0xc042160780, 0xc0422d52e8, 0x0, 0x0)
        /home/luke/go/src/github.com/NebulousLabs/bolt/db.go:603 +0xa1
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).managedAcceptBlocks(0xc042288000, 0xc042d3e000, 0xa, 0xa, 0x0, 0x0, 0x0)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/accept.go:245 +0x4f9
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).managedReceiveBlocks(0xc042288000, 0xe0b2e0, 0xc0420024c0, 0x0, 0x0)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/synchronize.go:225 +0x500
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).(github.com/NebulousLabs/Sia/modules/consensus.managedReceiveBlocks)-fm(0xe0b2e0, 0xc0420024c0, 0x0, 0x0)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/synchronize.go:445 +0x45
github.com/NebulousLabs/Sia/modules/gateway.(*Gateway).managedRPC(0xc042188000, 0xc042210340, 0x11, 0xac4d91, 0xa, 0xc0421400f0, 0x0, 0x0)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/gateway/rpc.go:66 +0x2c9
github.com/NebulousLabs/Sia/modules/gateway.(*Gateway).RPC(0xc042188000, 0xc042210340, 0x11, 0xac4d91, 0xa, 0xc0421400f0, 0x0, 0x0)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/gateway/rpc.go:76 +0xd8
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).threadedInitialBlockchainDownload.func1(0xc042288000, 0xc042af5ef0, 0xc042af5e98, 0xc042af5ea0, 0x0, 0x0)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/synchronize.go:580 +0x12e
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).threadedInitialBlockchainDownload(0xc042288000, 0x0, 0x0)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/synchronize.go:601 +0x151
github.com/NebulousLabs/Sia/modules/consensus.New.func1(0x1, 0xc0421501b0, 0xc042288000, 0xe0b560, 0xc042188000)
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/consensusset.go:151 +0x3eb
created by github.com/NebulousLabs/Sia/modules/consensus.New
        /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/consensusset.go:144 +0x656