Bitcoin Forum
May 10, 2024, 09:20:33 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What could get your wallet.dat corrupted?  (Read 1453 times)
CryptoPanda (OP)
Sr. Member
****
Offline Offline

Activity: 882
Merit: 302


View Profile
August 11, 2014, 11:58:01 AM
 #1

Well I just had wallet.dat corrupted so bad that even the bitcoind restore process upon launch couldn't fix it.
Of course I have a back-up, but would be interesting to discuss what usually causes that so we can avoid it in future.
It was latest version bitcoind running on a fairly powerful dedicated server with centOS.
About 20GB free space was left at the time of corruption.

We had 10s of thousands of keys generated because of the nature of the service, and the wallet was over 90mb.

Thoughts?
Make sure you back up your wallet regularly! Unlike a bank account, nobody can help you if you lose access to your BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715376033
Hero Member
*
Offline Offline

Posts: 1715376033

View Profile Personal Message (Offline)

Ignore
1715376033
Reply with quote  #2

1715376033
Report to moderator
1715376033
Hero Member
*
Offline Offline

Posts: 1715376033

View Profile Personal Message (Offline)

Ignore
1715376033
Reply with quote  #2

1715376033
Report to moderator
1715376033
Hero Member
*
Offline Offline

Posts: 1715376033

View Profile Personal Message (Offline)

Ignore
1715376033
Reply with quote  #2

1715376033
Report to moderator
mix1
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
August 11, 2014, 03:43:11 PM
 #2

Well I just had wallet.dat corrupted so bad that even the bitcoind restore process upon launch couldn't fix it.
Of course I have a back-up, but would be interesting to discuss what usually causes that so we can avoid it in future.
It was latest version bitcoind running on a fairly powerful dedicated server with centOS.
About 20GB free space was left at the time of corruption.

We had 10s of thousands of keys generated because of the nature of the service, and the wallet was over 90mb.

Thoughts?


Possible it was the hardrive itself that got corrupted? sounds like it and lucky you had backup.
RedDiamond
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250


View Profile
August 11, 2014, 04:02:27 PM
 #3

Server run out of virtual memory?

Have you already checked log files for possible error messages?
CryptoPanda (OP)
Sr. Member
****
Offline Offline

Activity: 882
Merit: 302


View Profile
August 12, 2014, 02:44:52 PM
 #4

To be honest I haven't. I thought it must be something with bitcoind done wrong, but now that you are saying it it very well might be a trivial reason.
Looking it up now.

If you guys have more ideas in the meantime, please let me know Smiley


Also did someone have his wallet corrupted but bitcoind manged to fix it upon launch?
Relnarien
Sr. Member
****
Offline Offline

Activity: 399
Merit: 257


View Profile
August 13, 2014, 05:03:55 AM
 #5

Well I just had wallet.dat corrupted so bad that even the bitcoind restore process upon launch couldn't fix it.
Of course I have a back-up, but would be interesting to discuss what usually causes that so we can avoid it in future.
It was latest version bitcoind running on a fairly powerful dedicated server with centOS.
About 20GB free space was left at the time of corruption.

We had 10s of thousands of keys generated because of the nature of the service, and the wallet was over 90mb.

Thoughts?


Like most files, your wallet.dat file will have its data corrupted if an application is currently writing to it (your Bitcoin client, for example) and it abruptly closes. Running out of hard drive and memory space also risks the possibility of corrupting your wallet.dat file if it is currently being processed during that time. And of course, there's always the self-inflicted case of improperly writing onto your wallet.dat file either intentionally or unintentionally.
Relnarien
Sr. Member
****
Offline Offline

Activity: 399
Merit: 257


View Profile
August 13, 2014, 11:04:36 AM
 #6

Is it enough to backup the wallet.dat file once or do you need to do it on a regular basis and why?

Depending on the Bitcoin client that you're using, change from a sent transaction may be sent to a newly generated change address. For example, let's say that you have 1 whole Bitcoin as an unspent input. If you send 0.5 of that to someone else's address, then the remaining 0.5 will be sent back to an address in your Bitcoin wallet. I'm not familiar with all the Bitcoin clients that currently exist, but I know that some Bitcoin clients generate new change addresses on-the-fly. In those cases, your previous backup file would not contain the newly generated private-public key pairing, which would mean that your remaining 0.5 Bitcoin is inaccessible using that file. Ideally, you should make a new backup of your wallet.dat file after every time that you send out a new transaction.
Truecoin
Sr. Member
****
Offline Offline

Activity: 312
Merit: 250


View Profile
August 13, 2014, 11:28:17 AM
 #7


About 20GB free space was left at the time of corruption.

We had 10s of thousands of keys generated because of the nature of the service, and the wallet was over 90mb.

Thoughts?


20GB free space is not much. Do you have bitcoind installed into / partition? Maybe you should create larger separate partition and move bitcoin data files there.


CryptoPanda (OP)
Sr. Member
****
Offline Offline

Activity: 882
Merit: 302


View Profile
August 14, 2014, 01:30:31 PM
 #8

Do you guys think there is other way to fix the wallet if bitcoind autofix fails?
Velkro
Legendary
*
Offline Offline

Activity: 2296
Merit: 1014



View Profile
August 14, 2014, 02:32:11 PM
 #9

HDD failure, viruses, HDD bad sectors, things like that only
btchris
Hero Member
*****
Offline Offline

Activity: 672
Merit: 504

a.k.a. gurnec on GitHub


View Profile WWW
August 14, 2014, 09:10:53 PM
 #10

Do you guys think there is other way to fix the wallet if bitcoind autofix fails?

pywallet can scan a file (or a hard drive) for mkeys and ckeys (everything required to recover encrypted private keys/addresses), try decrypting them in various combinations, and then reconstruct a wallet.dat file. It almost works, except that the reconstructed wallet.dat doesn't work right unless you choose for it to be unencrypted (which is an undocumented feature). I've submitted a patch which will hopefully be included one day, because aside from that last step it works quite well.
Wafel16
Member
**
Offline Offline

Activity: 63
Merit: 10


View Profile
August 15, 2014, 04:40:17 PM
 #11

HDD failure, viruses, HDD bad sectors, things like that only

Yes, but also add hardware disfunctions to that, that is a common problem.
RedDiamond
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250


View Profile
August 15, 2014, 06:08:48 PM
 #12

HDD failure, viruses, HDD bad sectors, things like that only

Yes, but also add hardware disfunctions to that, that is a common problem.

Agree. For example bad DRAM chip can cause very strange errors (ECC is therefore highly recommended).

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!