Bitcoin Forum
December 15, 2024, 11:46:36 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin-Qt 0.8.0-beta wallet-corrupt, failed salvage OS X  (Read 9398 times)
jordan.dev (OP)
Full Member
***
Offline Offline

Activity: 151
Merit: 100



View Profile WWW
April 29, 2013, 07:59:16 AM
 #1

I went to open Bitcoin-Qt 0.8.0-beta, which I have been running for about a month, earlier this weekend, and discovered it was crashing when opening in OS X Mountain Lion (10.8.3) and after I few tries attempting to get it to open, I figured I must need to fix my wallet file, or upgrade Bitcoin-Qt, but nothing has solved it so far.

I'm not extremely concerned as there wasn't much coin in there, but what I am concerned about is the fact that I haven't been regularly backing up my wallet.dat file that I keep locally (I know I should) but it's mostly a staging area when I move coins between some online places.

Here is the output of the Apple crash report:

Code:
Process:         Bitcoin-Qt [2671]
Path:            /Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt
Identifier:      com.yourcompany.Bitcoin-Qt
Version:         ???
Code Type:       X86 (Native)
Parent Process:  launchd [184]
User ID:         501

Date/Time:       2013-04-29 01:50:03.072 -0600
OS Version:      Mac OS X 10.8.3 (12D78)
Report Version:  10

Interval Since Last Report:          114782 sec
Crashes Since Last Report:           3
Per-App Crashes Since Last Report:   3
Anonymous UUID:                      FA0E7BF8-AE0D-2013-49A7-C83B01284DF7

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000060

VM Regions Near 0x60:
--> __PAGEZERO             0000000000000000-0000000000001000 [    4K] ---/--- SM=NUL  /Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt
    __TEXT                 0000000000001000-000000000056e000 [ 5556K] r-x/rwx SM=COW  /Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.yourcompany.Bitcoin-Qt     0x000bd2bc InvalidChainFound(CBlockIndex*) + 652
1   com.yourcompany.Bitcoin-Qt     0x000d256f ConnectBestBlock(CValidationState&) + 1135
2   com.yourcompany.Bitcoin-Qt     0x0011c127 AppInit2() + 16839
3   com.yourcompany.Bitcoin-Qt     0x00021d33 main + 7603
4   com.yourcompany.Bitcoin-Qt     0x0001ec71 start + 53

I followed all the usual procedures after creating a complete copy of my Bitcoin folder (~/Library/Application Support/Bitcoin)

  • Deleted everything except 'wallet.dat', and reopened Bitcoin-Qt (Also tried this after downloading 0.8.1), not the same result, instead of a crash I get: 'wallet corrupt, salvage failed' message when launching, the wallet.dat file is replaced with a 'walletxxx.backup'
  • pywallet --dumpwallet which results in: ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again.
  • bitcointools: fixwallet (same error as pywallet)

Is this typical? What'd I do wrong? Should I not have run my wallet with 0.8.0-beta? Should I backup the file DAILY in-case of corruption? If the issue is just "InvalidChainFound" why would that affect my wallet?

At this point I'd be happy just to get my address/private-keys back.

BLOG | PGP | Bitcoin Trading Professionals | Bitfinex Affiliate Code: kwr9f922HS - 10% of trading fees for 30 days | Live Bitfinex Charts
Newar
Legendary
*
Offline Offline

Activity: 1358
Merit: 1001


https://gliph.me/hUF


View Profile
April 29, 2013, 09:47:05 AM
 #2

Not sure if this will help you but:

  • Deleted everything except 'wallet.dat', and reopened Bitcoin-Qt (Also tried this after downloading 0.8.1), not the same result, instead of a crash I get: 'wallet corrupt, salvage failed' message when launching, the wallet.dat file is replaced with a 'walletxxx.backup'
I had exactly the same on Linux when I did a fresh install. Fixed it by: Deleting wallet.dat, run bitcoin-qt (in my case: 0.8.1-beta), it will create a new wallet.dat, shut down bitcoin-qt (it takes a while, so wait), overwrite newly created wallet.dat with the one from the backup, restart bitcoin-qt -> worked for me

OTC rating | GPG keyid 1DC91318EE785FDE | Gliph: lightning bicycle tree music | Mycelium, a swift & secure Bitcoin client for Android | LocalBitcoins
jordan.dev (OP)
Full Member
***
Offline Offline

Activity: 151
Merit: 100



View Profile WWW
May 01, 2013, 04:51:56 AM
Last edit: May 01, 2013, 05:30:39 AM by jordan.dev
 #3

Not sure if this will help you but:

I had exactly the same on Linux when I did a fresh install. Fixed it by: Deleting wallet.dat, run bitcoin-qt (in my case: 0.8.1-beta), it will create a new wallet.dat, shut down bitcoin-qt (it takes a while, so wait), overwrite newly created wallet.dat with the one from the backup, restart bitcoin-qt -> worked for me

no joy yet, the program didn't crash, but I got a "wallet corrupted - salvage failed" again - anyone else have any other suggestions?

Update

Looks like I'm not the only one having issues with wallet corruption w/ OS X 10.8.3 on a Macbook Pro (or something similar), see here: https://github.com/bitcoin/bitcoin/issues/2435

Some are prompted to "redownload the block chain" though I haven't gotten this. After reinstall 0.8.0-beta and replacing the file here is are my log files:

db.log
Code:
file unknown has LSN 4874/4246774, past end of log at 1/1129905
Commonly caused by moving a database from one database environment
to another without clearing the database LSNs, or by removing all of
the log files from a database environment
file unknown has LSN 4874/4246774, past end of log at 1/1129997
Commonly caused by moving a database from one database environment
to another without clearing the database LSNs, or by removing all of
the log files from a database environment
Page 0: metadata page corrupted
Page 0: could not check metadata page
wallet.dat: DB_VERIFY_BAD: Database verification failed
file unknown has LSN 4874/4246774, past end of log at 1/1131045
Commonly caused by moving a database from one database environment
to another without clearing the database LSNs, or by removing all of
the log files from a database environment
wallet.1367386037.bak: DB_VERIFY_BAD: Database verification failed

debug.log
Code:
Bitcoin version v0.8.0-beta (2013-02-18 18:38:34 -0500)
Using OpenSSL version OpenSSL 1.0.1c 10 May 2012
Startup time: 2013-05-01 05:27:17
Default data directory /Users/jordanbaucke/Library/Application Support/Bitcoin
Used data directory /Users/jordanbaucke/Library/Application Support/Bitcoin
Using 8 threads for script verification
init message: Verifying wallet integrity...
dbenv.open LogDir=/Users/jordanbaucke/Library/Application Support/Bitcoin/database ErrorFile=/Users/jordanbaucke/Library/Application Support/Bitcoin/db.log
Renamed wallet.dat to wallet.1367386037.bak
ERROR: db salvage failed
Salvage(aggressive) found no records in wallet.1367386037.bak.

BLOG | PGP | Bitcoin Trading Professionals | Bitfinex Affiliate Code: kwr9f922HS - 10% of trading fees for 30 days | Live Bitfinex Charts
wedgy2k
Sr. Member
****
Offline Offline

Activity: 329
Merit: 251



View Profile
May 15, 2013, 07:06:55 AM
 #4

Hi
Interested in this thread as i'm getting the occasional crash (ML 10.8.3 - Mac Mini 16gb Ram)
v0.8.1-beta

Code:
Process:         Bitcoin-Qt [17107]
Path:            /Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt
Identifier:      com.yourcompany.Bitcoin-Qt
Version:         ???
Code Type:       X86 (Native)
Parent Process:  launchd [148]
User ID:         501

Date/Time:       2013-05-15 07:35:15.088 +0100
OS Version:      Mac OS X 10.8.3 (12D78)
Report Version:  10

Crashed Thread:  12

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000


I'm guessing i'll need to remove -> re-install and place wallet.dat in correct directory then launch?

Cheers

Wedgy2k

jordan.dev (OP)
Full Member
***
Offline Offline

Activity: 151
Merit: 100



View Profile WWW
May 15, 2013, 03:40:09 PM
 #5

I never had any luck restoring. I tried a few different tools like pywallet ... no luck

BLOG | PGP | Bitcoin Trading Professionals | Bitfinex Affiliate Code: kwr9f922HS - 10% of trading fees for 30 days | Live Bitfinex Charts
salty
Full Member
***
Offline Offline

Activity: 562
Merit: 100



View Profile
May 24, 2013, 10:38:29 PM
 #6

I'm having the exact same issue, I also tried importing the wallet.dat into blockchain.info and that didn't happen, but the backup wallet from a previous version of bitcoin-qt worked.
jordan.dev (OP)
Full Member
***
Offline Offline

Activity: 151
Merit: 100



View Profile WWW
May 30, 2013, 04:46:38 AM
 #7

So, I downloaded Bitcoin-Qt v0.8.2 and the wallet.dat file from my backup consistently returns the same "wallet corrupted" error.

I've also pulled the latest development branch off Github, and have built Bitcoind and directed it to run with the --datadir of my backup wallet, same result

Code:
macbook-pro:src jordanbaucke$ ./bitcoind --datadir=/Users/jordanbaucke/Library/Application\ Support/BitcoinBK/ -listen=0
Error: wallet.dat corrupt, salvage failed

Also the back-up files (a new one is created in the current directory whenever I launch the client with the corrupted wallet.dat) from the backed-up original directory don't work either (probably from attempts to launch with that directory)

I'm imagining if I had more BTC in this wallet and what sort of sick feeling that would give me, so I'm hoping that there is a tool out there that will let me explore this issue deeper and discover the problem?

Anyone?

BLOG | PGP | Bitcoin Trading Professionals | Bitfinex Affiliate Code: kwr9f922HS - 10% of trading fees for 30 days | Live Bitfinex Charts
salty
Full Member
***
Offline Offline

Activity: 562
Merit: 100



View Profile
June 01, 2013, 05:34:14 AM
 #8

bump
BittBurger
Hero Member
*****
Offline Offline

Activity: 924
Merit: 1001


View Profile
September 25, 2013, 03:56:49 AM
 #9

Just happened to me too.

I love how fucking buggy this software is.  given that it has entire savings accounts in it.

Who are the programmers?  Do they give a shit?  What if you have $10,000 worth of BTC in the file?   "Tough luck" ?

No support?  Nobody replies?  Thread just goes dead?

This is bullshit.  You can't have "bugs" and amateurish bullshit software when people's life savings are at stake.   

What's the solution to this new bug?  I am never trusting my wallets to Bitcoin QT again.  I haven't seen this many fucking bugs since windows 3.1

Owner: "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"
View it on the Blockchain | Genesis Block Newspaper Copies
jordan.dev (OP)
Full Member
***
Offline Offline

Activity: 151
Merit: 100



View Profile WWW
September 25, 2013, 06:20:22 AM
 #10

Just happened to me too.

I love how fucking buggy this software is.  given that it has entire savings accounts in it.

Who are the programmers?  Do they give a shit?  What if you have $10,000 worth of BTC in the file?   "Tough luck" ?

No support?  Nobody replies?  Thread just goes dead?

This is bullshit.  You can't have "bugs" and amateurish bullshit software when people's life savings are at stake.  

What's the solution to this new bug?  I am never trusting my wallets to Bitcoin QT again.  I haven't seen this many fucking bugs since windows 3.1

What version of the Bitcoin-Qt are you on?

I tried to launch the wallet file against 0.8.5 and got the same "wallet salvage failed" error again, so that hasn't helped things.

I guess I'd recommend a hosted wallet like "blockchain.info" - there are lots of other non-hosted implementations of Bitcoin you might consider if your disappointed with the bitcoind / bitcoin-qt software.

Here is the most recent log:

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: 2013-09-25 06:13:30
Default data directory /Users/jordanbaucke/Library/Application Support/Bitcoin
Using data directory /Users/jordanbaucke/Library/Application Support/Bitcoin
Using at most 125 connections (2560 file descriptors available)
Using 8 threads for script verification
init message: Verifying wallet...
dbenv.open LogDir=/Users/jordanbaucke/Library/Application Support/Bitcoin/database ErrorFile=/Users/jordanbaucke/Library/Application Support/Bitcoin/db.log
Renamed wallet.dat to wallet.1380089610.bak
Error: Salvage found errors, all data may not be recoverable.
Salvage(aggressive) found no records in wallet.1380089610.bak.
Flush(false)
DBFlush(false) ended               0ms
StopNode()
Flushed 0 addresses to peers.dat  1ms
Flush(true)
DBFlush(true) ended               0ms

db.log
Code:
file unknown has LSN 4874/4146063, past end of log at 1/28
Commonly caused by moving a database from one database environment
to another without clearing the database LSNs, or by removing all of
the log files from a database environment
Page 0: metadata page corrupted
Page 0: could not check metadata page
wallet.dat: DB_VERIFY_BAD: Database verification failed
file unknown has LSN 4874/4146063, past end of log at 1/1076
Commonly caused by moving a database from one database environment
to another without clearing the database LSNs, or by removing all of
the log files from a database environment
wallet.1380089610.bak: DB_VERIFY_BAD: Database verification failed

BLOG | PGP | Bitcoin Trading Professionals | Bitfinex Affiliate Code: kwr9f922HS - 10% of trading fees for 30 days | Live Bitfinex Charts
gmaxwell
Staff
Legendary
*
Offline Offline

Activity: 4298
Merit: 8822



View Profile WWW
September 25, 2013, 06:36:25 AM
 #11

Deleted everything except 'wallet.dat', and reopened Bitcoin-Qt (Also tried this after downloading 0.8.1), not the same result, instead of a crash I get: 'wallet corrupt, salvage failed' message when launching, the wallet.dat file is replaced with a 'walletxxx.backup'
By doing this you corrupted your wallet.  When the software is not cleanly shut down the wallet file may be in an inconsistent state and it many need the database/ subdirectory in order to be read— but you deleted that.

It refuses to go further now in order to avoid risking damaging more data.

You hit a common easily repaired issue and, unfortunately, made it worse. ::sigh::  Nothing unrecoverable, most likely.  Whoever told you to do that, please go punch them in the face.

First, The standard question:

Do you have a recent backup? If you have a recent backup the easiest path to recover will just be to use that.

Secondly, the important initial advice:

Before doing anything else, make a new backup of your current wallet.dat (and the database/ subdirectory if there is one anymore) and don't overwrite any old backups.
jordan.dev (OP)
Full Member
***
Offline Offline

Activity: 151
Merit: 100



View Profile WWW
September 25, 2013, 04:29:06 PM
 #12


You hit a common easily repaired issue and, unfortunately, made it worse. ::sigh::  Nothing unrecoverable, most likely.  Whoever told you to do that, please go punch them in the face.


I have backups of the __db.XXX files - and the wallet.dat files from when the original corruption occured.

And I followed instructions here : https://bitcointalk.org/index.php?topic=11331.0

They seemed to make logical sense, but I guess they were wrong -

I attempted to run it with `fixwallet.py` as mentioned.

BLOG | PGP | Bitcoin Trading Professionals | Bitfinex Affiliate Code: kwr9f922HS - 10% of trading fees for 30 days | Live Bitfinex Charts
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
September 25, 2013, 04:31:47 PM
 #13


You hit a common easily repaired issue and, unfortunately, made it worse. ::sigh::  Nothing unrecoverable, most likely.  Whoever told you to do that, please go punch them in the face.


I have backups of the __db.XXX files - and the wallet.dat files from when the original corruption occured.

And I followed instructions here : https://bitcointalk.org/index.php?topic=11331.0

They seemed to make logical sense, but I guess they were wrong -

I attempted to run it with `fixwallet.py` as mentioned.

try importing the wallet on a windows or linux computer and fixing with pywallet. its worth a shot.

My negative trust rating is reflective of a personal vendetta by someone on default trust.
jordan.dev (OP)
Full Member
***
Offline Offline

Activity: 151
Merit: 100



View Profile WWW
September 26, 2013, 04:28:16 AM
 #14

try importing the wallet on a windows or linux computer and fixing with pywallet. its worth a shot.

just got the latest pywallet (2.1.6) from Github, and tried it in Ubuntu 12.04 LTS w/ all the packages installed ... same error:

Code:
ERROR:root:Couldn't open wallet.dat/main

BLOG | PGP | Bitcoin Trading Professionals | Bitfinex Affiliate Code: kwr9f922HS - 10% of trading fees for 30 days | Live Bitfinex Charts
dserrano5
Legendary
*
Offline Offline

Activity: 1974
Merit: 1030



View Profile
September 26, 2013, 06:29:34 AM
 #15

Code:
ERROR:root:Couldn't open wallet.dat/main

This usually happens when you don't (correctly) use the parameters --datadir and --wallet to tell pywallet where your wallet is.
jordan.dev (OP)
Full Member
***
Offline Offline

Activity: 151
Merit: 100



View Profile WWW
September 26, 2013, 06:16:36 PM
 #16

Code:
ERROR:root:Couldn't open wallet.dat/main

This usually happens when you don't (correctly) use the parameters --datadir and --wallet to tell pywallet where your wallet is.

No I specified the 'datadir' and the wallet was still named 'wallet.dat' and it said that it defaults to that -- I guess I could try again specifying the 'wallet.dat' as the name?

BLOG | PGP | Bitcoin Trading Professionals | Bitfinex Affiliate Code: kwr9f922HS - 10% of trading fees for 30 days | Live Bitfinex Charts
BittBurger
Hero Member
*****
Offline Offline

Activity: 924
Merit: 1001


View Profile
September 29, 2013, 05:46:38 PM
 #17

Whatever the cause, im done with Bitcoin QT.  And any software for storage.  Paper wallet until something significantly more stable comes out.  
Unless they want to start providing people with their private key information, which continues to astound me (that they dont).
When you've got a shit ton of money stored in some software that won't even tell you your own private key, and routinely has bugs/failures/errors ... you'd have to be insane to put your money in it.

Just an update to this, i figured out (thank god) a way around this.

1)  When I move my wallet.dat file offline to a storage device, I copy the file, then paste it to the new location, then renamed it to another xxxx.dat
2)  I then delete the wallet.dat file I copied.
3)  When I moved the wallet.dat file from the offline storage back into QT directory, it failed to open.
4)  When I pulled the deleted wallet.dat file from recycle bin, it opened,  and as fast as a possibly could, I moved all my coins out of QT to a paper wallet.

Apparently the act of moving the file and/or renaming it and moving it back ... causes corruption in the file.   

This was the only solution that worked.  

Owner: "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"
View it on the Blockchain | Genesis Block Newspaper Copies
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
September 29, 2013, 06:04:52 PM
 #18

Whatever the cause, im done with Bitcoin QT.  And any software for storage.  Paper wallet until something significantly more stable comes out.  
Unless they want to start providing people with their private key information, which continues to astound me (that they dont).
When you've got a shit ton of money stored in some software that won't even tell you your own private key, and routinely has bugs/failures/errors ... you'd have to be insane to put your money in it.

Just an update to this, i figured out (thank god) a way around this.

1)  When I move my wallet.dat file offline to a storage device, I copy the file, then paste it to the new location, then renamed it to another xxxx.dat
2)  I then delete the wallet.dat file I copied.
3)  When I moved the wallet.dat file from the offline storage back into QT directory, it failed to open.
4)  When I pulled the deleted wallet.dat file from recycle bin, it opened,  and as fast as a possibly could, I moved all my coins out of QT to a paper wallet.

Apparently the act of moving the file and/or renaming it and moving it back ... causes corruption in the file.   

This was the only solution that worked.  

are you kidding?

to view your privatekey type the following into the console.
Code:
dumpprivkey <youraddress>

My negative trust rating is reflective of a personal vendetta by someone on default trust.
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!