Sia icon indicating copy to clipboard operation
Sia copied to clipboard

Consensus change series appears to be inconsistent - we are applying the wrong block.

Open chrsch opened this issue 6 years ago • 12 comments

BUG REPORT

Stack Trace or error message PS C:\Users\cscha> C:\Sia-v1.3.2-windows-amd64\siad.exe -d G:\Blockchains\SIA
Sia Daemon v1.3.2 Git Revision 72938f5 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 20.4331806 seconds panic: Consensus change series appears to be inconsistent - we are applying the wrong block.

goroutine 62407 [running]: github.com/NebulousLabs/Sia/modules/transactionpool.(*TransactionPool).ProcessConsensusChange(0xc0421a62c0, 0x83d1b026941fa14, 0 x3159f5cd34fceb04, 0x2fc68a3e204f17be, 0xf1dc6d03b3a37b7b, 0x0, 0x0, 0x0, 0xc0c921cd20, 0x1, ...) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/transactionpool/update.go:223 +0x28d3 github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).updateSubscribers(0xc0421ac500, 0x0, 0x0, 0x0, 0xc0cc33c8e0, 0x1, 0x1) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/subscribe.go:118 +0x184 github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).managedAcceptBlocks(0xc0421ac500, 0xc0aeb0bd48, 0x1, 0x1, 0x1e8400 , 0x0, 0x0) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/accept.go:311 +0x5e0 github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).managedReceiveBlock.func1(0xb3e840, 0xc0af06db40, 0x0, 0x0) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/synchronize.go:529 +0x1fc github.com/NebulousLabs/Sia/modules/gateway.(*Gateway).managedRPC(0xc0421a6000, 0xc042247ec0, 0x12, 0xa986bf, 0x7, 0xc0c8b61770, 0x0, 0x0) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/gateway/rpc.go:66 +0x2b2 github.com/NebulousLabs/Sia/modules/gateway.(*Gateway).RPC(0xc0421a6000, 0xc042247ec0, 0x12, 0xa986bf, 0x7, 0xc0c8b61770, 0x0, 0 x0) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/gateway/rpc.go:76 +0xcb github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).threadedRPCRelayHeader.func5(0xc043c12fb0, 0xc0421ac500, 0xb3e840, 0xc0c5f8c020, 0xc04319fe00, 0xc0afea1030) /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/synchronize.go:459 +0x147 created by github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).threadedRPCRelayHeader /home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/synchronize.go:457 +0x40f PS C:\Users\cscha> C:\Sia-v1.3.2-windows-amd64\siad.exe -d G:\Blockchains\SIA\

Expected Behavior

  • No exception
  • siad runs again after re-started (but siad repeats giving above error message)

How to reproduce it (as minimally and precisely as possible) No special action, three files were uploading at this point.

Environment

  • Sia version: 1.3.2
  • OS: Win 10 64bit

chrsch avatar Mar 14 '18 21:03 chrsch

Same here on linux. v1.3.2

2018/03/15 02:17:17.594935 persist.go:86: STARTUP: Logging has started. Siad Version 1.3.2
2018/03/15 02:21:16.783446 update.go:175: CCID 48e3046a (height 29916): 1 applied blocks, 0 reverted blocks
2018/03/15 04:51:22.527201 persist.go:86: STARTUP: Logging has started. Siad Version 1.3.2
2018/03/15 04:51:23.552423 update.go:175: CCID 48e3046a (height 29916): 1 applied blocks, 0 reverted blocks

chargr avatar Mar 15 '18 04:03 chargr

I renamed my 'transactionpool' folder and started siad to create a new one, it took about 40 minutes, but it is back up again.

chargr avatar Mar 15 '18 05:03 chargr

@DavidVorick just an FYI that this has been reported several times on Discord as well as here, always with 1.3.2. We may want to look at what introduced this bug.

tbenz9 avatar Mar 16 '18 22:03 tbenz9

I've seen the same error 3x today.

Running SiaUI 1.3.2 on Windows 10 pro 64-bit.

I'll try @chargr route with the transactionpool folder and will report back if that resolved it.

ceo-nada avatar Mar 19 '18 18:03 ceo-nada

@tbenz9 iirc this sanity check was introduced by @DavidVorick after we noticed that our boltdb databases corrupted over time for some users. It should only be triggered after updating to 1.3.2 because 1.3.1 silently ignored this issue. I would recommend everyone to do a clean install of Sia 1.3.2 to avoid that potential issue.

ChrisSchinnerl avatar Mar 19 '18 18:03 ChrisSchinnerl

Update: I tried deleting the transactionpool folder and doing a clean install.

Both resulted in the same "things take a while to load after updating" display (Sorry I don't have the exact on-screen display message).

After deleting the transactionpool folder, the App was hung for over 4 hours.

Then I closed the app and did a clean install of 1.3.2

It's been hung on that same screen for about an hour.

ceo-nada avatar Mar 19 '18 23:03 ceo-nada

Another report of this issue https://www.reddit.com/r/siacoin/comments/85p3hr/anyone_know_why_i_cant_run_the_siaui_ive_been/

Bojak4616 avatar Mar 20 '18 13:03 Bojak4616

I've duplicated the issue on Mac OS 10.13.3.

Let me be clear that I'm unable to access my Sia coin on any platform. Good thing it's a bear market!

I've tried the following troubleshooting steps and it's the same error everytime: Fresh installs, deleting consensus, deleting transactionpool folder.

ceo-nada avatar Apr 05 '18 14:04 ceo-nada

We're actively troubleshooting this error in Discord right now. Can anyone try following these instructions to delete your transactionpool.db file and report back if it worked.

https://gist.github.com/tbenz9/8066d74853ab28c23bd7bc1d3c7cdeda#delete-the-transactionpooldb-file

tbenz9 avatar May 07 '18 20:05 tbenz9

For me, it worked to remove the transactionpool folder completely (renamed it to .old), created an empty one and restarted Sia. This fixed it for me (see comment by @chargr above). Basically, this folder holds the .db and the .log file. So yes, helped! (@tbenz9 notice my improved punctuation ;-) )

chrsch avatar May 09 '18 07:05 chrsch

I encountered this on 1.3.2 (not fresh install and load, it's an upgrade from 1.3.1). The issue happened after a system crash. Following a manual siad restart, the system is working normally with no symptoms of any problem. Stack below.

Sia Daemon v1.3.2
Git Revision 72938f5
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 228.4287506 seconds
panic: Consensus change series appears to be inconsistent - we are applying the wrong block.

goroutine 10418 [running]:
github.com/NebulousLabs/Sia/modules/transactionpool.(*TransactionPool).ProcessConsensusChange(0xc04226c000, 0xeb5078dc0065d61d, 0x4764b5c5f215a736, 0x7710f9a5be90d379, 0xf165500076cdda93, 0x0, 0x0, 0x0, 0xc042aed560, 0x1, ...)
	/home/luke/go/src/github.com/NebulousLabs/Sia/modules/transactionpool/update.go:223 +0x2b68
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).updateSubscribers(0xc0420d7b80, 0x0, 0x0, 0x0, 0xc042663ea0, 0x1, 0x1)
	/home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/subscribe.go:118 +0x17f
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).managedAcceptBlocks(0xc0420d7b80, 0xc044809d40, 0x1, 0x1, 0x1e8400, 0x0, 0x0)
	/home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/accept.go:311 +0x61e
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).managedReceiveBlock.func1(0xdf80e0, 0xc0426ac640, 0x0, 0x0)
	/home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/synchronize.go:529 +0x1fc
github.com/NebulousLabs/Sia/modules/gateway.(*Gateway).managedRPC(0xc0420ca580, 0xc0421ba7e0, 0x14, 0xac0901, 0x7, 0xc042df5650, 0x0, 0x0)
	/home/luke/go/src/github.com/NebulousLabs/Sia/modules/gateway/rpc.go:66 +0x2c9
github.com/NebulousLabs/Sia/modules/gateway.(*Gateway).RPC(0xc0420ca580, 0xc0421ba7e0, 0x14, 0xac0901, 0x7, 0xc042df5650, 0x0, 0x0)
	/home/luke/go/src/github.com/NebulousLabs/Sia/modules/gateway/rpc.go:76 +0xd8
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).threadedRPCRelayHeader.func5(0xc042439960, 0xc0421627e0, 0xc0420d7b80, 0xdf80e0, 0xc044539340, 0xc042d76780)
	/home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/synchronize.go:459 +0x147
created by github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).threadedRPCRelayHeader
	/home/luke/go/src/github.com/NebulousLabs/Sia/modules/consensus/synchronize.go:457 +0x447

hackneyb avatar May 13 '18 17:05 hackneyb

I believe that this bug will be fixed when #3030 is merged. To all the users who continue to see this every now and then, please let us know if you continue to run into the issue after upgrading to v1.3.3.

DavidVorick avatar May 25 '18 22:05 DavidVorick