Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

corruption errors When I try to sync #502

Open
alptolga opened this issue Sep 8, 2022 · 3 comments
Open

corruption errors When I try to sync #502

alptolga opened this issue Sep 8, 2022 · 3 comments

Comments

@alptolga
Copy link

alptolga commented Sep 8, 2022

Hi
I always get corruption errors. Can you help me? fast or full mode when I try to sync.

CRIT [09-08|20:54:22.403] Failed to persist accounts err="leveldb/table: corruption on data-block (pos=57475056): checksum mismatch, want=0x4644b562 got=0xd18f03e0 [file=001907.ldb]"

**Software version:

core-geth-alltools-linux-v1.12.8

Java version:

openjdk version "11.0.16" 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu118.04)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu118.04, mixed mode, sharing)

OS Name & Version:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.6 LTS"
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Kernel Version:

Linux srv 5.6.17-050617-generic #202006071230 SMP Sun Jun 7 12:35:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

@ziogaschr
Copy link
Member

Is this happening on a fresh datadir? Have you upgraded from an old version of core-geth?
Changing from fast to full mode will not work. Once you move from full to fast your historic data will get pruned.

  1. Have you tried a fresh sync, on a new datadir?
  2. Up to what block number are you synced at the moment?
  3. Can it be that your hard disk is near the end of its life? Though I don't believe so, as it found the checksum for existing data.

You can try to use debug.setHead(block_number) to move in a previous state and start syncing again.

@alptolga
Copy link
Author

I got error fast or full mode. I tried both ways after I clean the data dir for fresh sync.
I tried debug.setHead(700000) to turm back block 700000 but I couldn't
Can you give me more detail about it?

sudo ./geth --classic --syncmode full console
INFO [09-10|04:15:02.123] Starting Geth on Ethereum Classic...
INFO [09-10|04:15:02.124] Maximum peer count ETH=50 LES=0 total=50
INFO [09-10|04:15:02.124] Smartcard socket not found, disabling err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [09-10|04:15:02.125] Set global gas cap cap=50,000,000
INFO [09-10|04:15:02.135] Configured Ethereum protocol versions capabilities=[66]
INFO [09-10|04:15:02.135] Allocated trie memory caches clean=154.00MiB dirty=256.00MiB
INFO [09-10|04:15:02.135] Allocated cache and file handles database=/home/tt/.ethereum/classic/geth/chaindata cache=512.00MiB handles=2048
INFO [09-10|04:15:02.162] Opened ancient database database=/home/tt/.ethereum/classic/geth/chaindata/ancient readonly=false
INFO [09-10|04:15:02.329] Persisted trie from memory database nodes=12356 size=1.78MiB time=18.225706ms gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [09-10|04:15:02.330] Found stored genesis block config="NetworkID: 1, ChainID: 61 Engine: ethash ECBP1100: 11380000 EIP1014: 9573000 EIP1052: 9573000 EIP1108: 10500839 EIP1344: 10500839 EIP140: 8772000 EIP145: 9573000 EIP150: 2500000 EIP152: 10500839 EIP155: 3000000 EIP160: 3000000 EIP161abc: 8772000 EIP161d: 8772000 EIP170: 8772000 EIP1884: 10500839 EIP198: 8772000 EIP2028: 10500839 EIP211: 8772000 EIP212: 8772000 EIP213: 8772000 EIP214: 8772000 EIP2200: 10500839 EIP2565: 13189133 EIP2718: 13189133 EIP2929: 13189133 EIP2930: 13189133 EIP2: 1150000 EIP3529: 14525000 EIP3541: 14525000 EIP658: 8772000 EIP7: 1150000 EthashECIP1010Continue: 5000000 EthashECIP1010Pause: 3000000 EthashECIP1017: 5000000 EthashECIP1041: 5900000 EthashECIP1099: 11700000 EthashEIP100B: 8772000 EthashHomestead: 1150000 "
INFO [09-10|04:15:02.333]
INFO [09-10|04:15:02.333] ---------------------------------------------------------------------------------------------------------------------------------------------------------
INFO [09-10|04:15:02.333] NetworkID: 1, ChainID: 61 Engine: ethash ECBP1100: 11380000 EIP1014: 9573000 EIP1052: 9573000 EIP1108: 10500839 EIP1344: 10500839 EIP140: 8772000 EIP145: 9573000 EIP150: 2500000 EIP152: 10500839 EIP155: 3000000 EIP160: 3000000 EIP161abc: 8772000 EIP161d: 8772000 EIP170: 8772000 EIP1884: 10500839 EIP198: 8772000 EIP2028: 10500839 EIP211: 8772000 EIP212: 8772000 EIP213: 8772000 EIP214: 8772000 EIP2200: 10500839 EIP2565: 13189133 EIP2718: 13189133 EIP2929: 13189133 EIP2930: 13189133 EIP2: 1150000 EIP3529: 14525000 EIP3541: 14525000 EIP658: 8772000 EIP7: 1150000 EthashECIP1010Continue: 5000000 EthashECIP1010Pause: 3000000 EthashECIP1017: 5000000 EthashECIP1041: 5900000 EthashECIP1099: 11700000 EthashEIP100B: 8772000 EthashHomestead: 1150000
INFO [09-10|04:15:02.333] ---------------------------------------------------------------------------------------------------------------------------------------------------------
INFO [09-10|04:15:02.333]
INFO [09-10|04:15:02.335] Disk storage enabled for ethash caches dir=/home/tt/.ethereum/classic/geth/etchash count=3
INFO [09-10|04:15:02.336] Disk storage enabled for ethash DAGs dir=/home/tt/.etchash count=2
INFO [09-10|04:15:02.337] Initialising Ethereum protocol network=1 dbversion=8
WARN [09-10|04:15:11.280] Truncating freezer table database=/home/tt/.ethereum/classic/geth/chaindata/ancient table=headers items=790,584 limit=783,942
WARN [09-10|04:15:11.281] Truncating freezer table database=/home/tt/.ethereum/classic/geth/chaindata/ancient table=bodies items=790,825 limit=783,942
ERROR[09-10|04:15:11.281] Error in block freeze operation err="block receipts missing, can't freeze block 795978"
INFO [09-10|04:15:11.284] Loaded most recent local header number=926,449 hash=390fa0..c4be49 td=6,309,442,910,444,059,405 age=6y8mo2w
INFO [09-10|04:15:11.284] Loaded most recent local full block number=926,449 hash=390fa0..c4be49 td=6,309,442,910,444,059,405 age=6y8mo2w
INFO [09-10|04:15:11.284] Loaded most recent local fast block number=926,449 hash=390fa0..c4be49 td=6,309,442,910,444,059,405 age=6y8mo2w
WARN [09-10|04:15:11.284] Head state missing, repairing number=926,449 hash=390fa0..c4be49 snaproot=a0a3e8..9c3638
debug.setHead(700000)
ERROR[09-10|04:15:26.455] Missing block in the middle, aiming genesis number=886,471 hash=0340ab..b82814
CRIT [09-10|04:15:26.455] Failed to store last block's hash err="leveldb/table: corruption on data-block (pos=56655003): checksum mismatch, want=0x14fbd389 got=0xddac4a44 [file=000157.ldb]"
tt@srv:~$ debug.setHead(700000)
bash: syntax error near unexpected token `700000'

@ziogaschr
Copy link
Member

You have to run the debug command from with the console.
Below you can see an example.

Note: using sudo is not needed, though you have already used sudo and your datadir might have stored the data as root. If you are familiar you can use sudo chown -R ${USER}:${USER} <your_datadir_folder> in order to change permissions and remove sudo in your next run.

$ ./geth --classic --syncmode full console
Welcome to the Geth JavaScript console!

instance: CoreGeth/v1.12.9-unstable/darwin-arm64/go1.19.1
coinbase: 0x****
at block: 7015521 (Mon Aug 22 2022 20:50:09 GMT+0300 (EEST))
 datadir: ***
 modules: admin:1.0 debug:1.0 engine:1.0 eth:1.0 ethash:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 trace:1.0 txpool:1.0 web3:1.0

To exit, press ctrl-d or type exit
> debug.setHead(web3.toHex(700000))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants