bitcoin: Fatal LevelDB error: Corruption: block checksum mismatch on Linux ext4 SATA SSDs
Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
I’ve been struggling with the errors mentioned here for a little while now: https://github.com/bitcoin/bitcoin/issues/30159#issuecomment-2301642234
I’m running this on a desktop machine, not in the cloud, and on external SATA ext4 disks because my main system drive is formatted with Btrfs, which doesn’t work very well with key-value databases, I’ve found.
Expected behaviour
I get this error during IBD and also during reindexing.
Steps to reproduce
This the command I’m running:
bitcoind -server -txindex=1 -datadir=/mnt/ThreeEight/bitcoind-mainnet -rpccookiefile=/mnt/ThreeEight/bitcoind-mainnet/.cookie
Relevant log output
2024-08-21T19:18:30Z UpdateTip: new best=0000000000000000000187d6a944e562d55881b738db06f0580d138c6af52754 height=856674 version=0x2192a000 log2_work=95.095637 tx=1058965890 date='2024-08-14T01:14:02Z' progress=0.995862 cache=253.5MiB(2160229txo)
2024-08-21T19:18:30Z UpdateTip: new best=0000000000000000000197cc7a6d13c63cd086ca46372cc94577ff62fa56d568 height=856675 version=0x3e000000 log2_work=95.095650 tx=1058971585 date='2024-08-14T01:18:33Z' progress=0.995863 cache=253.8MiB(2162814txo)
2024-08-21T19:18:30Z LevelDB read failure: Corruption: block checksum mismatch: /mnt/ThreeEight/bitcoind-mainnet/chainstate/873236.ldb
2024-08-21T19:18:30Z Fatal LevelDB error: Corruption: block checksum mismatch: /mnt/ThreeEight/bitcoind-mainnet/chainstate/873236.ldb
2024-08-21T19:18:30Z You can use -debug=leveldb to get more complete diagnostic messages
2024-08-21T19:18:30Z Error: Error reading from database, shutting down.
Error: Error reading from database, shutting down.
2024-08-21T19:18:30Z Error reading from database: Fatal LevelDB error: Corruption: block checksum mismatch: /mnt/ThreeEight/bitcoind-mainnet/chainstate/873236.ldb
fish: Job 1, 'bitcoind -server -txindex=1 -da…' terminated by signal SIGABRT (Abort)
How did you obtain Bitcoin Core
Package manager
What version of Bitcoin Core are you using?
v27.1.0
Operating system and version
Arch Linux
Machine specifications
AMD 5950 CPU 128GB DDR4 4TB NVMe for OS 2TB & 3.8 TB 2.5" SATA SSDs
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 45 (26 by maintainers)
@maflcko Ah yes, it is the version here that had a corruption in the txindex: https://bitcoin.stackexchange.com/q/123999/208
@ismaelsadeeq this is likely an exfat issue: see eg https://github.com/bitcoin/bitcoin/issues/31454
I’d recommend using a different format on the external drive if possible
I set it to 1024, will see if that helps
bitcoind hasn’t been updated on Arch yet. I’m waiting for that to come out. https://archlinux.org/packages/?sort=&q=bitcoin&maintainer=&flagged=
Closing for now due to inactivity, but please do provide a comment with more details, if you find anything.
Running from USB will definitely simplify the procedure. I recommend running for several hours, maybe overnight. Also, get your storage media scanned for errors. SMART long scan + ext4 filesystem check. Also, you were saying bitcoind doesn’t work very well with Btrfs, can you check again and report back? Let’s see if you will be getting any errors. I am running bitcoind on Btrfs no problem, like previously mentioned.
I am also inclined to say this is hardware error. I had these and it turned out to be unreliable RAM. Put that database on Btrfs, it should never have checksum corruption error there. If it does, on Btrfs, and you have kernel errors about checksum, then this is 100% hardware problem. I run full node on Btrfs and I don’t have any problems.
Bitcoin Core makes heavy use of CPU, RAM and storage IO. Hardware defects might only become visible when running Bitcoin Core. You might want to check your hardware for defects.
Source: https://bitcoin.stackexchange.com/a/12206