Error reading from database shutting down bitcoin core

Содержание
  1. Bitcoin Core keeps coming up with the error: “error reading from database, shutting down”
  2. 1 Answer 1
  3. Not the answer you’re looking for? Browse other questions tagged bitcoin-core or ask your own question.
  4. Related
  5. Hot Network Questions
  6. Subscribe to RSS
  7. Bitcoin Core gives error “Error reading from database, shutting down” during first time setup
  8. bitcoin-qt.exe stops working #6949
  9. Comments
  10. shadowsjack commented Nov 5, 2015
  11. laanwj commented Nov 5, 2015
  12. shadowsjack commented Nov 6, 2015
  13. jonasschnelli commented Nov 6, 2015
  14. laanwj commented Nov 6, 2015
  15. shadowsjack commented Nov 6, 2015
  16. shadowsjack commented Nov 6, 2015
  17. unsystemizer commented Nov 7, 2015
  18. shadowsjack commented Nov 8, 2015
  19. unsystemizer commented Nov 8, 2015
  20. laanwj commented Nov 9, 2015
  21. LevelDB read failure: Corruption: block checksum mismatch #10897
  22. Comments
  23. safocl commented Jul 21, 2017 •
  24. Machine specs:
  25. jonasschnelli commented Jul 24, 2017
  26. safocl commented Jul 24, 2017
  27. TheBlueMatt commented Jul 25, 2017
  28. safocl commented Jul 25, 2017
  29. TheBlueMatt commented Jul 25, 2017
  30. safocl commented Jul 26, 2017
  31. TheBlueMatt commented Jul 26, 2017
  32. safocl commented Jul 26, 2017
  33. laanwj commented Jul 27, 2017
  34. safocl commented Jul 27, 2017 •
  35. gmaxwell commented Aug 1, 2017
  36. safocl commented Aug 1, 2017
  37. safocl commented Aug 7, 2017
  38. gmaxwell commented Aug 20, 2017
  39. Blockchain sync failure #6606
  40. Comments
  41. bol-van commented Aug 31, 2015
  42. bol-van commented Aug 31, 2015
  43. laanwj commented Aug 31, 2015
  44. bol-van commented Aug 31, 2015
  45. bol-van commented Sep 1, 2015
  46. laanwj commented Sep 1, 2015
  47. wtogami commented Sep 1, 2015
  48. bol-van commented Sep 1, 2015
  49. bol-van commented Sep 1, 2015
  50. bol-van commented Sep 2, 2015
  51. laanwj commented Sep 2, 2015
  52. bol-van commented Sep 2, 2015

Bitcoin Core keeps coming up with the error: “error reading from database, shutting down”

Bitcoin 0.14.1 Windows 10 Home v. 1703 Bitcoin Core keeps coming up with the error: «error reading from database, shutting down». I’ve tried deleting the one and only file in the database folder under J:\Users custom made\James\AppData\Roaming\Bitcoin latest\database and restarting the computer, but the same error occurred after the app loaded and was showing the sync progress bar for a minute or so, as previously when the issue occurred today. I am having a similar issue with the Ethereum Mist program, where it crashes after running for a short time. The error on that app also mentioned the filepath to the chaindata. Similarly, I deleted all the chaindata, restarted and the program now has been syncing for many minutes, however it seems like it has started syncing from scratch rather than from where it was up to previously (close to 100%, with only a few thousand blocks left). The debugger for the error in Bitcoin qt in Visual Studio Community says nothing:

1 Answer 1

To fix this problem you will need to reindex. You have already begun that process by delete the chainstate folder. Bitcoin Core will appear as if it is syncing from scratch, but it is not. It is simply reading through all of the block files already on disk and building its databases. If the reindex does not fix your problems, then you may need to actually resync the blockchain, and if that also fails, then you likely have a hardware error.

Not the answer you’re looking for? Browse other questions tagged bitcoin-core or ask your own question.

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.6.10.39473

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Bitcoin Core gives error “Error reading from database, shutting down” during first time setup

I have recently installed Bitcoin Core on my Gentoo system via portage. During the first time setup, the initial download stopped at roughly 30% completion and gave the error «Error reading from database, shutting down». Restarting the program would set the progress back a small amount and restart the download, but it would always fail at the same point. I tried running Bitcoin core with the -reindex flag, and after doing so the download made it farther — to 43.81% — but then gave the same error. As I mentioned before, this is during the first time download of the blockchain; I’ve never used the program for anything else.

Some points that may be important:

I have more than enough disk space.

I dualboot with Windows, and as such the first time I ran Bitcoin core I had a clock skew. It ran for a minute or so before I realized, closed the program and corrected it. I haven’t run it with a clock skew since.

It almost always fails on the same point — in this case, at anywhere from 134577 to 134579 blocks remaining. After restarting, it starts the download at 134609, giving a difference of roughly 40 blocks. (As I mentioned before, however, it failed much earlier before reindexing.)

Читайте также:  Росстат прямые иностранные инвестиции это

I installed through portage, and as such I have no reason to believe that any dependencies are missing.

Does this look like a hardware issue? I’ve yet to do any disk tests other than a simple ram test, which returned no issues. Thank you in advance.

Here are some basic specifications for the machine in question.

Источник

bitcoin-qt.exe stops working #6949

Comments

shadowsjack commented Nov 5, 2015

The application crash error log:
Error reading from database, shutting down
Microsoft Visual C++ Runtime Library
This application has requested the Runtime to terminate in an unusual way.
Problem signature:
Problem Event Name: APPCRASH
Application Name: bitcoin-qt.exe
Application Version: 0.11.1.0
Application Timestamp: 556ba080
Fault Module Name: bitcoin-qt.exe
Fault Module Version: 0.11.1.0
Fault Module Timestamp: 556ba080
Exception Code: 40000015
Exception Offset: 011eefb5
OS Version: 6.0.6002.2.2.0.256.6
Locale ID: 1033

which prevents the block chain from being imported. Similar issues have been reported on the Stack Exchange.

The text was updated successfully, but these errors were encountered:

laanwj commented Nov 5, 2015

Can you paste the end of debug.log?

shadowsjack commented Nov 6, 2015

The rest of the error log:

Additional Information 1: 06d4
Additional Information 2: f9337f77c523c7a049cb4c2e00dc872a
Additional Information 3: 131b
Additional Information 4: dfd2c70bac16e3f92e3f905aa6b45cfc

The block chain is on an external USB hard drive since it’s too big for this old Latitude’s primary hard drive. It’s probably something relatively simple but of course unknown to most since the other threads got no response.

jonasschnelli commented Nov 6, 2015

Can you post the full debug log or at least the last 50 lines?

laanwj commented Nov 6, 2015

I have no clue what the additional information is.
Really need bitcoin core’s debug.log, not OS information

shadowsjack commented Nov 6, 2015

The debug file is attached. Bit Coin Core crashes when started so the programs features are unavailable. The error can be reproduced by reinstallation but that’s not going to resolve anything.

shadowsjack commented Nov 6, 2015

The error message from the debug file:

2015-11-05 14:13:13 LevelDB read failure: Corruption: block checksum mismatch
2015-11-05 14:13:14 Corruption: block checksum mismatch
2015-11-05 14:14:18 Error reading from database: Database corrupted

unsystemizer commented Nov 7, 2015

So your database is clearly corrupt and you suspect there’s something wrong with the program. Why is that?

shadowsjack commented Nov 8, 2015

The latest of over a dozen application crash debug logs:

2015-11-08 14:10:38 Corruption: block checksum mismatch
2015-11-08 14:10:38 *** System error while flushing: Database corrupted
2015-11-08 14:10:45 ERROR: ProcessNewBlock: ActivateBestChain failed
2015-11-08 14:10:46 ERROR: ConnectBlock(): inputs missing/spent
2015-11-08 14:10:46 Misbehaving: 168.158.129.29:8333 (0 -> 100) BAN THRESHOLD EXCEEDED
2015-11-08 14:10:46 InvalidChainFound: invalid block=00000000000005042206cba30b5a8a726ff87478297af2e160e3410b9aa7020c height=192994 log2_work=68.509605 date=2012-08-09 04:39:31
2015-11-08 14:10:46 InvalidChainFound: current best=000000000000003c0df9b9c5e29e00d7fd9da1ddde8bbaca294f5ac06e847dc2 height=192993 log2_work=68.509575 date=2012-08-09 04:28:52
2015-11-08 14:10:46 ERROR: ConnectTip(): ConnectBlock 00000000000005042206cba30b5a8a726ff87478297af2e160e3410b9aa7020c failed
2015-11-08 14:10:46 InvalidChainFound: invalid block=00000000000005042206cba30b5a8a726ff87478297af2e160e3410b9aa7020c height=192994 log2_work=68.509605 date=2012-08-09 04:39:31
2015-11-08 14:10:46 InvalidChainFound: current best=000000000000003c0df9b9c5e29e00d7fd9da1ddde8bbaca294f5ac06e847dc2 height=192993 log2_work=68.509575 date=2012-08-09 04:28:52
2015-11-08 14:10:46 socket send error An operation was attempted on something that is not a socket. (10038)
2015-11-08 14:10:47 ERROR: AcceptToMemoryPool: non-final
2015-11-08 14:10:47 ERROR: AcceptToMemoryPool: non-final
2015-11-08 14:10:47 ERROR: AcceptToMemoryPool: non-final
2015-11-08 14:10:47 ERROR: AcceptToMemoryPool: non-final
2015-11-08 14:10:47 ERROR: AcceptToMemoryPool: non-final
2015-11-08 14:10:47 ERROR: AcceptToMemoryPool: non-final
2015-11-08 14:10:47 net thread interrupt
2015-11-08 14:10:47 msghand thread interrupt
2015-11-08 14:10:47 addcon thread interrupt
2015-11-08 14:10:47 scheduler thread interrupt
2015-11-08 14:10:51 opencon thread interrupt
2015-11-08 14:10:51 Shutdown: In progress.
2015-11-08 14:10:52 StopNode()
2015-11-08 14:10:52 Corruption: block checksum mismatch
2015-11-08 14:10:52 *** System error while flushing: Database corrupted

The block chain is being corrupted during the operation of the program. File corruption has been a continuing problem since the beginning of information technology. The more data that has to be handled the more likely these issues will happen.

unsystemizer commented Nov 8, 2015

You started off with a «bitcoin-qt.exe can’t start», now you’re admitting the blockchain was corrupted before that. Plus there’s already this issue for that: #6528

laanwj commented Nov 9, 2015

Ok, your chainstate database is corrupted. You can regenerate it by passing -reindex as a command line argument.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

LevelDB read failure: Corruption: block checksum mismatch #10897

Comments

safocl commented Jul 21, 2017 •

bitcoin core 0.14.2 is official binary files

start is:
bitcoind -daemon -server -dbcache=3000
or
bitcoind -daemon -server
or
bitcoin-qt

Machine specs:

  • OS:archlinux
  • CPU:intel I3 2100
  • RAM:8GB
  • Disk size:2TB
  • Disk Type (HD/SDD):HD

when trying to sync the blockchain every time appears the same error. https://ptpb.pw/5l4Y

this problem the computer began in 2016, up to this point normally synchronized

on a laptop with the same configuration except hdd size 500GB processor i3 2350M, synchronization of the blockchain is successful. OS on laptop is the same archlinux with the same version of the packages.

The text was updated successfully, but these errors were encountered:

jonasschnelli commented Jul 24, 2017

Do you really use a physical connected HDD (or a NAS or NFS/SMB device)?
If you use an attached HDD and encounter this over and over, then I recommend to check your RAM and disk for corruptions.
Bitcoin-Core is a great tool to identify hardware failures.

Читайте также:  Как получить возврат налога за инвестиции

safocl commented Jul 24, 2017

S. M. A. R. T shows excellent results. FS is also not damaged.
forgot to mention that the problem detected and Windows on this computer, which is installed on another hard disk partition.
Tests of RAM previously, when this issue did not reveal any problems with her.

TheBlueMatt commented Jul 25, 2017

You say «every time», I assume that means you’ve hit the same issues multiple times? Have you tried a reindex as well? Have you tried using a different disk?

safocl commented Jul 25, 2017

You say «every time», I assume that means you’ve hit the same issues multiple times? Have you tried a reindex as well? Have you tried using a different disk?

Yes, this error has plagued me in January 2016, the unit on which the error occurs is always the same. Re-indexing was done not once, but the results are the same. Hard drive change is not possible in the absence of the other.

TheBlueMatt commented Jul 25, 2017

Does it always happen at the same/similar height?

If not, I hate to say it, but I’m gonna bet this is silent disk corruption. You may wish to try again with a filesystem which does checksumming (btrfs, zfs, etc, though note performance drawbacks there).

safocl commented Jul 26, 2017

ran the hard drive tests and RAM, no errors found. At the expense of other file systems-so the problem is not only on ext4 on linux, but on windows on this computer, where the file system is ntfs.

TheBlueMatt commented Jul 26, 2017

That sounds very much like silent drive corruption (or other hardware issues) to me — SMART tests are only capable of detecting certain types of issues.

safocl commented Jul 26, 2017

but I ran the tests the file system for errors in it was not.

laanwj commented Jul 27, 2017

«block checksum mismatch» is a db level error, which happens if the CRC written with a block of data doesn’t match the data, on read.
So either it didn’t get written properly, or it was randomly overwritten later. Many things can cause this on your system, including buggy drivers, overheating CPU/GPUs, and so on, not just a flaky HDD.
It’s impossible to say with this information.

safocl commented Jul 27, 2017 •

overheating of the processor and graphics card didn’t happen. monitored the process in real time.

LTC is synchronized without problems.

also excluded buggy drivers, as the laptop uses the same OS in which the same driver.

gmaxwell commented Aug 1, 2017

The failed checksum is more or less definitive, it seems that you are very dismissive of the possibility of hardware failure— but there are tens of thousands of other nodes that run without issue (including test nodes with very abusive operating conditions). The fact that LTC is synced isn’t much of an indicator, as LTC has thousands of times less load than Bitcoin.

safocl commented Aug 1, 2017

so the fact that if I downloaded the full someone’s blockchain, everything will work fine and continue to synchronize.

safocl commented Aug 7, 2017

put the other hard drive (the laptop on which everything runs fine), the effect is the same

I do not understand what trubble maybe even, why is this a checksum error? DDR3 tested — passed all tests on hurrah, without errors. The processor can’t understand what’s can be?

that’s the unit number is of course different, but still it is 2015, and it all started at the beginning of 2016. and constantly error in the blocks in 2015.

gmaxwell commented Aug 20, 2017

set assumevalid=0 and I bet it’ll fail somewhat earlier. I think it’s failing after it’s done enough signature validation to heat things up in your computer.

Источник

Blockchain sync failure #6606

Comments

bol-van commented Aug 31, 2015

I’m on Bitcoin core v0.11.0 windows x64.
OS is Windows Server 2012 R2.

I’ve been using bitcoin core for years without significant problems, but last month something happened. Database got corrupted. I tried to delete all but wallet.dat, resync database. Tried

5 times, put datadir to different hard drives. At random position sync stops with error. After process relaunch same error is displayed and program crashes with assertion.



The text was updated successfully, but these errors were encountered:

bol-van commented Aug 31, 2015

Same thing happens to bitcoind.

C:\Program Files\Bitcoin\daemon>bitcoind.exe -datadir=H:\bitcoin
Error: Error reading from database, shutting down.

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application’s support team for more information.

2015-08-31 12:39:34 LevelDB read failure: Corruption: block checksum mismatch
2015-08-31 12:39:34 Corruption: block checksum mismatch
2015-08-31 12:39:34 Error: Error reading from database, shutting down.
2015-08-31 12:39:34 Error reading from database: Database corrupted

laanwj commented Aug 31, 2015

«Error reading from database: Database corrupted» levelDB corruption is usually caused by disk or memory corruption (while writing to disk).
You could try using -par=1 to restrict syncing to one thread and then -reindex . Sometimes this helps when, for example, the CPU is overheating.

Читайте также:  Как выглядит биткоин при покупке

bol-van commented Aug 31, 2015

Unlikely this is RAM or DISK problem. OS runs stable for weeks, memtest report nothing.
No bad block events in the event log. One of the disks I tried to put db on is several days old.
Ram problems are mostly random. Here I have 100% failure result each time.
Any ways to further diagnose the source of the problem ?

bol-van commented Sep 1, 2015

I reproduced exact same behavior in VM with Windows Server 2003 X64.
Pls someone try to resync the whole db ! Am I alone with this ?

laanwj commented Sep 1, 2015

I’d be interested to know if the same happens in that VM with Bitcoin 10.2.

wtogami commented Sep 1, 2015

You are able to reproduce the failure on other hardware?
What about bitcoind or bitcoin-qt for Linux in a VM?

bol-van commented Sep 1, 2015

Both 0.10.2 and 0.11.0 cannot start db sync when empty datadir is on «\vmware-host\shared folders» and successfully do when datadir is on windows network drive.

2015-09-01 09:51:55 init message: Loading block index.
2015-09-01 09:51:55 Opening LevelDB in Z:\home-h\Bit2test\blocks\index
2015-09-01 09:51:55 Corruption: no meta-nextfile entry in descriptor
2015-09-01 09:52:23 init message: Loading block index.
2015-09-01 09:52:23 Wiping LevelDB in Z:\home-h\Bit2test\blocks\index
2015-09-01 09:52:23 Opening LevelDB in Z:\home-h\Bit2test\blocks\index
2015-09-01 09:52:23 Corruption: no meta-nextfile entry in descriptor
2015-09-01 09:52:25 Shutdown: In progress.
2015-09-01 09:52:25 StopNode()
2015-09-01 09:52:25 Shutdown: done

bol-van commented Sep 1, 2015

I have one guess. Trouble can be in memory mapped files. I know bitcoin core uses them, it can be seen in RamMap utility.
I also run BURST coin pocminer. It extensively uses mapped files. Because of that kernel paged pool grows very large — up to more than half of the physical memory (its gigabytes). Huge pooltag is «MmSt», it contain PTEs. Detailed subject description is here : http://blogs.technet.com/b/askperf/archive/2011/09/23/getting-to-know-the-mmst-pool-tag.aspx
I’m on 24 GB system and set the PoolUsageMaximum to 10 (its 10 percent of RAM, 2.4G in my case). This measure effectively limit MmSt growth and it worked great until. what changed in last weeks ?
I replaced failing hard drive which contain 3 TB of BURST miner plots. This time I formatted NTFS volume with 64K cluster size (was 4K).
And probably from that point bitcoin db corruptions started.
Now i killed pocminer and trying to sync bitcoin both on the host and in VM.
Without pocminer bitcoin could start sync on vmware-host shared folder.
Will report after my guess is confirmed or no.

PS. Bitcoin 0.11.0 linux x86, runs on different hardware node without VM. Already synced till 1 year old, still no problem.

bol-van commented Sep 2, 2015

Yes, trouble was triggered by BURST miner. Without it sync was successful.
Running with almost exhausted paged pool cause errors not only in bitcoin core but also have other negative effects and having large cluster volume seem to harden them.

laanwj commented Sep 2, 2015

Thanks for looking into this so deeply. This issue could be useful for other people that experience issues on windows.

I still wonder how the combination of hw and sw caused corruption, but it’s likely the problem lies outside bitcoin core if it affects other software negatively as well.

bol-van commented Sep 2, 2015

One of the negative effects was the following.
Attempts to start db sync from bitcoin core running in vmware guest to vmware host drive were failing just at the start. Then I tried to mount network drive from vm guest to vm host using virtual network (regular ‘net use \192.168.1.5’) and sync db to that drive.
Start was successful but after some time I saw messages in the tray stating that windows could not flush data to network drive and data could be lost. Obviously, bitcoin core cannot display such messages, explorer.exe displays them. Event source is guest os kernel not being able to get read/write success confirmation from the server side. Thus the lanmanserver (The ‘Server’ service) component on the host was experiencing problems in exhausting paged pool condition probably IO-related.
Its all very strange because in the task manager on the host I see that pool is being trimmed from 2.8G to 800M after its exhaustion and then again grows to 2.8G.
I can suppose some paged pool allocations or some map-view-of-file operations fail before MmSt trim actually happens. Kernel components are written well-checked to not crush in any possible condition, but still denial-of-service exists.
Windows architecture problem ? I know burst miner is badly designed. It should not map terabytes of data files to memory. But also OS should not behave bad in this condition. If MmSt pool is like cache it must be trimmed transparently without alloc fails.

From bitcoin core perspective may be some checks are missing or db engine lack enough atomicity to rollback failing changes ? At the moment I can state : BURST miner can kill bitcoin db in some conditions, possibly when burst plots are on a large cluster volume.
This is not HW related at all. Its mainly the OS problem not being too resistant to some conditions.

Источник

Оцените статью