Open LordDarkHelmet opened 3 years ago
The original error occurred when I was attempting to shutdown the wallet. The wallet was running for a while before the attempted shutdown. It most likely had plenty of connections. The wallet was not mining or minting. The wallet was locked.
From discord discussion: The first error happened when I was attempting to close the wallet. It was a fatal error. The wallet caught it gracefully and an error was presented to the user. While this error should not have happened, at least the wallet caught it. The error was a checksum mismatch and a corruption of the database. Hence the need for a --reindex
. Even if the wallet was on a fork, the database should not have been corrupted. Hence the reason I posted it to GitHub as an issue.
For the second error that happened on restart, was while reading the corrupted database. In this case there was no graceful exit. The program completely crashed out. While this is an unexpected issue (the database should not have been corrupted) there should have been a check in the code that caught unexpected errors while reading the DB. There is an assertion() check in the code (https://github.com/ioncoincore/ion/blob/ba48de3f1da907218d4336f2b8e8343efca4c2f9/src/evo/evodb.cpp#L71). Most of the time assertions are used in test cases. In this case the assertion is unhanded and the program crashes out. Basically the check is valid, but handling the case where the check fails does not happen. The try-catch-finally method is the reason why assertions are not common in modern non-test code. In an ideal world the assertion would happen and either the program would throw up the issue to the user with steps that can be taken to resolve, or the program itself should know the DB is corrupted and attempt a repair. The repair is computationally expensive, so I would recommend the notice for the QT wallet. I would recommend the auto repair for daemon based instances as there is no user to make a decision.
The --reindex fixes the DB error because it just deletes whatever database is there (in our case the corrupted one) and replaces it with a fresh one.
Got an error that I had not seen before Fatal Error: "Corruption: block checksum mismatch".
Describe the issue
From the log file:
v 5.0.00 When reloading I get:
Log file from restart:
Log file for the previous ~2 hours: https://pastebin.com/51mUWPu3
FYI, launching with
--reindex
seems to fix the issue. I will let you know if there are any issues with the repair. Strange error. I have never seen it before.Wallet has fully synced after
--reindex
and seems to be working without any issues.Can you reliably reproduce the issue?
Unable to reproduce
What version of Ion Core are you using?
5.0.00
Machine specs: