Bitcoin Forum
July 28, 2024, 04:43:11 AM *
News: Help 1Dq create 15th anniversary forum artwork.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: System error: Database corrupted (can this be fixed without blockchain re-sync?)  (Read 1143 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
DannyHamilton (OP)
Legendary
*
Offline Offline

Activity: 3472
Merit: 4759



View Profile
February 28, 2014, 05:14:09 AM
 #1

Is there anything I can do to fix the blockchain or wallet without having to re-sync the entire blockchain?

Do I just have 1 bad block in the blockchain?  If so, is there an easy way to delete the most recent few blocks and re-sync just those blocks?

Can I just delete the most recent blk*.dat and rev*.dat?  If I do that, are there other files that need to be updated to know what the new blockheight is in my wallet (to get it to re-sync from there)?

Mac OSX
Bitcoin-Qt Version v0.8.5-beta

I start up the Bitcoin-Qt wallet and see the following in the loading window:

Loading block index...
Verifying blocks...
Loading Wallet...

Then:
Popup window with red stop sign around a white exclamation mark and an <OK> button
Code:
System error: Database corrupted

When I click the <OK> button I see:

Loading Addresses...

Then the program closes.

debug.log:

Code:
Bitcoin version v0.8.5-beta (2013-09-12 13:35:18 +1000)
Using OpenSSL version OpenSSL 1.0.1c 10 May 2012
Startup time: 2014-02-28 03:55:27
Default data directory [redacted]
Using data directory [redacted]
Using at most 125 connections (2560 file descriptors available)
Using 2 threads for script verification
init message: Verifying wallet...
dbenv.open LogDir=[redacted] ErrorFile=[redacted]/db.log
Bound to [::]:8333
Bound to 0.0.0.0:8333
init message: Loading block index...
Opening LevelDB in [redacted]
Opened LevelDB successfully
Opening LevelDB in [redacted]
Opened LevelDB successfully
LoadBlockIndexDB(): last block file = 119
LoadBlockIndexDB(): last block file info: CBlockFileInfo(blocks=88, size=18261745, heights=288087...288174, time=2014-02-27...2014-02-27)
LoadBlockIndexDB(): transaction index disabled
LoadBlockIndexDB(): hashBestChain=0000000000000000854bcf91600c5eddeee568906d8895e8601de660a2f9cc96  height=288173 date=2014-02-27 21:54:08
init message: Verifying blocks...
Verifying last 288 blocks at level 2
No coin database inconsistencies in last 0 blocks (0 transactions)
 block index           21575ms
init message: Loading wallet...
nFileVersion = 80500
 wallet                 5328ms
LevelDB read failure: Corruption: block checksum mismatch
*** System error: Database corrupted
init message: Loading addresses...
Loaded 18082 addresses from peers.dat  116ms
Flush(false)
wallet.dat refcount=0
wallet.dat checkpoint
wallet.dat detach
wallet.dat closed
DBFlush(false) ended             283ms
StopNode()
Flushed 18082 addresses to peers.dat  65ms
Committing 608 changed transactions to coin database...
Flush(true)
wallet.dat refcount=0
wallet.dat checkpoint
wallet.dat detach
wallet.dat closed
DBFlush(true) ended             201ms



db.log:

Code:
Database handles still open at environment close
Open database handle: wallet.dat/main

This thread is self-moderated so I can delete useless advice from people making random guesses with no knowledge about the topic at hand.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!