pocketnetteam / pocketnet.core

Decentralized social network based on the blockchain
https://pocketnet.app
Apache License 2.0
114 stars 28 forks source link

Hard crash with V20.29. This has happened a few times in the last week. #490

Closed the-real-vortex-v closed 1 year ago

the-real-vortex-v commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

2022-12-04T06:28:59Z Block indexed: 1991276 BH: cca41b8a15d8ae9cf4155ab83d2ef6b2c43ca71f08a8caec868602281039baba 2022-12-04T06:28:59Z +++ Block connected to chain: 1991276 BH: cca41b8a15d8ae9cf4155ab83d2ef6b2c43ca71f08a8caec868602281039baba 2022-12-04T06:28:59Z Fatal LevelDB error: Corruption: block checksum mismatch: G:\coins\pocketnet\indexes\txindex\1648744.ldb 2022-12-04T06:28:59Z You can use -debug=leveldb to get more complete diagnostic messages 2022-12-04T06:29:00Z


EXCEPTION: 15dbwrapper_error
Fatal LevelDB error: Corruption: block checksum mismatch: G:\coins\pocketnet\indexes\txindex\1648744.ldb
K:\Coins\PocketNet\PocketnetCore\pocketcoin-qt.exe in scheduler

To Reproduce Steps to reproduce the behavior: Run the node software.

Expected behavior Not a hard crash.

Desktop (please complete the following information): Windows 10 x64.

v20.29 of the node software

From an earlier log as well:

also from an earlier crash: 2022-12-03T15:34:28Z +++ Block connected to chain: 1990388 BH: 759e1544e7ecb088fa10a8b44cfdea140c3e6e34214e64ad9111a2c9972ace81 2022-12-03T15:35:05Z Block indexed: 1990389 BH: d0a7dc93b46c6b4f125678f87518ef09a4c693d20bd782241eb15d51164d587e 2022-12-03T15:35:05Z +++ Block connected to chain: 1990389 BH: d0a7dc93b46c6b4f125678f87518ef09a4c693d20bd782241eb15d51164d587e 2022-12-03T15:35:05Z Fatal LevelDB error: Corruption: block checksum mismatch: G:\coins\pocketnet\indexes\txindex\1624320.ldb 2022-12-03T15:35:05Z You can use -debug=leveldb to get more complete diagnostic messages 2022-12-03T15:35:06Z

EXCEPTION: 15dbwrapper_error Fatal LevelDB error: Corruption: block checksum mismatch: G:\coins\pocketnet\indexes\txindex\1624320.ldb K:\Coins\PocketNet\PocketnetCore\pocketcoin-qt.exe in scheduler

2022-12-03T16:07:46Z

So more than one block is causing the crash.

All I need to do is run the node again and it just works for a while longer.

andyoknen commented 1 year ago

I have faced this problem several times, but unfortunately, too little data to draw conclusions( also to reproduce the situation is difficult enough..

the-real-vortex-v commented 1 year ago

Tell me what you need. I have gotten this crash about 4 or 5 times in the last few days. Could you at least make it not hard crash? starting pocketnet works fine. So that tells me that either pocketnet recovers from the crash or the data on the disk is fine.

andyoknen commented 1 year ago

HM, if the problem is stable, you can try to enable full log: 'debug=all'

But be careful, it will take a lot of space on your disk - for a day it can be 1-2 gigabytes

the-real-vortex-v commented 1 year ago

ok, next time It crashes I'll debug=all. I have a basic logrotate in windows and I store the logs on another drive. Do you want a copy of the logrotate batchfile (it's for windows)? It might be handy for users or devs.

andyoknen commented 1 year ago

yes, it would be interesting to take a look

the-real-vortex-v commented 1 year ago

Here is Logrotate2.bat: ` @echo off :: logrotate V2

:: variables set logdir=k:\coins\pocketnet\logs set compress=y set archive=logs.7z set c_exe="C:\Program Files\7-Zip\7z.exe"

:: Do not modify these variables. They are for date and time (yes obvious but required). set d=%date% set t=%time%

:: Magic string manipulation to pull the time and date apart. If you want yank formatting then you'll need to work out how to do that. Civilized people put the day first. set dstr=%d:~4,2%-%d:~7,2%-%d:~10,4% set dstr=%dstr: =0% set tstr=%t:~0,2%.%t:~3,2%.%t:~6,2%.%t:~9,2% set tstr=%tstr: =0%

echo Log rotating: echo Date %dstr% Time %tstr%

echo preparing header file echo --- Log rotated on date %dstr% Time %tstr% --- set r=%random% echo --- Log rotated on date: %dstr% Time: %tstr% --- >---logtemp.%r%.tmp

echo copying debug.log to %logdir%\debug.%dstr%%tstr%.log copy debug.log %logdir%\debug.%dstr%%tstr%.log copy ---logtemp.%r%.tmp debug.log del ---logtemp.%r%.tmp echo tmpfile removed.

:: 7zip can compress files that are in use by another process but I think quickly copying it and then flushing the file is less likely to lose log lines. if %compress%==y %cexe% a -mx9 %logdir%\%archive% %logdir%\debug.%dstr%%tstr%.log -sdel

echo Finished. `

the-real-vortex-v commented 1 year ago

So far the log is around 2.2gigs but I'm using ntfs compression to bring it down to 450mb on disk or so. I'll rotate it soon. How many days/hours of logs would you need when the crash happens?

andyoknen commented 1 year ago

I think 1 day will be enough

andyoknen commented 1 year ago

@the-real-vortex-v Can we close this issue?

the-real-vortex-v commented 1 year ago

If you want. If it starts crashing again i'll reopen/resubmit and post a log.