“error reading from database. shutting down” #22426

issue ntherrien openend this issue on July 11, 2021
  1. ntherrien commented at 3:31 am on July 11, 2021: none

    Hi,

    This is the first time i was using BitCoin Core and syncing.

    Describe the issue: the software fails to sync 100%. It fails around 2020 with the error message “error reading from database. shutting down”. Tried restarting a couple times, it makes some more progress then stops somewhere else.

    What behavior did you expect? As a first time user I was expecting this to go smooth and sync to be successful.

    How reliably can you reproduce the issue, what are the steps to do so? Yes every time I restart it will hit an issue when syncing 2020 and stop.

    What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? I am using the portable version in a zip file, for windows, version 0.21.1

    I also checked that the download I used was the right checksum and signed with the right key.

    What type of machine are you observing the error on (OS/CPU and disk type)? This is a windows 10 computer with Intel i7-6700HQ

    Here are the logs for the latest occurrence:

    2021-07-11T02:00:10Z LevelDB read failure: Corruption: block checksum mismatch: D:\BitcoinLedger\chainstate/209877.ldb 2021-07-11T02:00:10Z Fatal LevelDB error: Corruption: block checksum mismatch: D:\BitcoinLedger\chainstate/209877.ldb 2021-07-11T02:00:10Z You can use -debug=leveldb to get more complete diagnostic messages 2021-07-11T02:00:10Z Error: Error reading from database, shutting down. 2021-07-11T02:00:15Z Error reading from database: Fatal LevelDB error: Corruption: block checksum mismatch: D:\BitcoinLedger\chainstate/209877.ldb

    I checked my computer for hard drive corruption issues. Copied 50Gbs back and forth with checksum no errors. Memory also checks ok.

    When I search the whole logs, the corruption message is always about 209877… Is there a way I can force a re-download or something?

  2. maflcko added the label Data corruption on Jul 11, 2021
  3. pinheadmz commented at 6:15 pm on March 8, 2023: member
    @ntherrien is this still an issue for you? Did you try anything else that worked?
  4. maflcko commented at 6:58 pm on March 8, 2023: member

    Is this an external hard drive? Otherwise:

    Bitcoin Core makes heavy use of CPU, RAM and disk IO. Hardware defects might only become visible when running Bitcoin Core. You might want to check your hardware for defects.

    • memtest86 to check your RAM
    • to check the CPU behaviour under load, use linpack or Prime95
    • to test your storage device use smartctl or CrystalDiskInfo

    Source: https://bitcoin.stackexchange.com/a/12206

  5. maflcko added the label Block storage on Mar 8, 2023
  6. ntherrien commented at 7:41 pm on March 8, 2023: none

    Hi, thanks for looking into this over-a-year-old issue.

    About whether or not this was an external drive. No this was an internal drive. A reliable 1TB 7200rpm drive.

    About the hardware defects suggestion, I remember trying it on two different computers and had the same issue. Likelihood of a hardware issue is very low in my opinion because im still using both computers a year later with other intensive tasks such as VMs and video encoding with no issues.

    As for whether or not this would still be an issue in a newer version, I could not say because I abandoned that project because I could not get it running properly. I would have to try again today to be sure.

    If you’d rather close the issue, I don’t mind!

    Cheers,

  7. maflcko added the label Windows on Mar 8, 2023
  8. maflcko commented at 9:16 pm on March 8, 2023: member

    We get a few data corruption reports regularly, however, no developer could reproduce them yet. So fixing them is hard and for debugging one can only throw blind guesses.

    My next guess would be to check if Anti-Virus Software was involved.

    If you can reliably reproduce this, it can help us if you shared the steps. Though, your Windows installation might largely differ from a fresh install of Windows. So if you can reproduce on a fresh install of Windows, that’d be ideal for finding the bug and a fix.

  9. maflcko commented at 9:51 am on March 9, 2023: member
    Again apologies for the slow turn-around. Closing for now, but if you have any more details or steps to reproduce, ideally on a fresh install of the operating system, please provide them here or in a new issue.
  10. maflcko closed this on Mar 9, 2023

  11. bitcoin locked this on Mar 8, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me