Pages:
Author

Topic: Bitcoin Wallet Can't Sync to Blockchain Without Throwing Errors (Read 3403 times)

member
Activity: 77
Merit: 10
There is something wrong with the wallet.dat file. On all of the systems where you have been seeing a problem, have you been copying the same wallet.dat file to each of them and trying to load it there?

So I have many backups of the wallet from many different times, and they all have had problems. But last night I dug deep and found one backup of my wallet from April 2016 and this was BEFORE the corruption, and it is working normally! Lucky me. Once it runs for a while without any problems, I can start backing up that current working wallet and toss all these other ones I have all over the place.

I'm having a similar problem with my dogecoin wallet but seeing as how the windows bitcoin wallet syncs to the blockchain in 2 days, and the mac bitcoin wallet syncs to the blockchain in 2 months, i'm going to acquire a bigger hard drive and run both wallets on windows instead, then I can try to figure out how to get those dogecoins back. But for now that's on hold. Glad to have this wallet back though. To everyone that just stuck with "your computer or hard drive are broken", making up answers to peoples problems doesn't help anyone.
staff
Activity: 3458
Merit: 6793
Just writing some code
There is something wrong with the wallet.dat file. On all of the systems where you have been seeing a problem, have you been copying the same wallet.dat file to each of them and trying to load it there?
member
Activity: 77
Merit: 10
Here's another debug log from a slightly older backup of my wallet. This in the previous logs are from Windows bitcoin. I have the same problem with bitcoin on Mac. My best guess is the Mac bitcoin wallet has some kind of fatal bugs in it that poisons the wallet.data file in some way.

Quote
2017-10-26 09:11:37
2017-10-26 09:11:37 Bitcoin version v0.15.0.1
2017-10-26 09:11:37 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2017-10-26 09:11:50 Assuming ancestors of block 0000000000000000003b9ce759c2a087d52abc4266f8f4ebd6d768b89defa50a have valid signatures.
2017-10-26 09:11:51 Using the 'standard' SHA256 implementation
2017-10-26 09:11:53 Default data directory C:\Users\xxxxxx\AppData\Roaming\Bitcoin
2017-10-26 09:11:53 Using data directory C:\Users\xxxxxx\Desktop\Bitcoin Wallet
2017-10-26 09:11:53 Using config file C:\Users\xxxxxx\Desktop\Bitcoin Wallet\bitcoin.conf
2017-10-26 09:11:53 Using at most 125 automatic connections (2048 file descriptors available)
2017-10-26 09:11:53 GUI: "registerShutdownBlockReason: Successfully registered: Bitcoin Core didn't yet exit safely..."
2017-10-26 09:11:53 Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2017-10-26 09:11:53 Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2017-10-26 09:11:53 Using 4 threads for script verification
2017-10-26 09:11:54 scheduler thread start
2017-10-26 09:11:54 init message: Verifying wallet(s)...
2017-10-26 09:11:54 Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
2017-10-26 09:11:54 Using wallet wallet.dat
2017-10-26 09:11:54 CDBEnv::Open: LogDir=C:\Users\xxxxxx\Desktop\Bitcoin Wallet\database ErrorFile=C:\Users\xxxxxx\Desktop\Bitcoin Wallet\db.log
2017-10-26 09:11:57 Cache configuration:
2017-10-26 09:11:57 * Using 2.0MiB for block index database
2017-10-26 09:11:57 * Using 8.0MiB for chain state database
2017-10-26 09:11:57 * Using 290.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2017-10-26 09:11:57 init message: Loading block index...
2017-10-26 09:11:58 Opening LevelDB in C:\Users\xxxxxx\Desktop\Bitcoin Wallet\blocks\index
2017-10-26 09:11:59 Opened LevelDB successfully
2017-10-26 09:11:59 Using obfuscation key for C:\Users\xxxxxx\Desktop\Bitcoin Wallet\blocks\index: 0000000000000000
2017-10-26 09:12:23 LoadBlockIndexDB: last block file = 1042
2017-10-26 09:12:23 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=96, size=69957200, heights=491713...491822, time=2017-10-25...2017-10-26)
2017-10-26 09:12:23 Checking all blk files are present...
2017-10-26 09:12:28 LoadBlockIndexDB: transaction index disabled
2017-10-26 09:12:28 Opening LevelDB in C:\Users\xxxxxx\Desktop\Bitcoin Wallet\chainstate
2017-10-26 09:12:28 Opened LevelDB successfully
2017-10-26 09:12:28 Using obfuscation key for C:\Users\xxxxxx\Desktop\Bitcoin Wallet\chainstate: dc3087dba2ad642e
2017-10-26 09:12:28 Loaded best chain: hashBestChain=00000000000000000080d70ed46b5f912ea0f0ba22c0d097be52c0fb8586e2b7 height=491822 date=2017-10-26 08:42:16 progress=0.999979
2017-10-26 09:12:28 init message: Rewinding blocks...
2017-10-26 09:12:32 init message: Verifying blocks...
2017-10-26 09:12:32 Verifying last 6 blocks at level 3
2017-10-26 09:12:32 [0%]...[16%]...[33%]...[50%]...[66%]...[83%]...[99%]...[DONE].
2017-10-26 09:14:31 No coin database inconsistencies in last 7 blocks (7711 transactions)
2017-10-26 09:14:31  block index          153863ms
2017-10-26 09:14:31 init message: Loading wallet...
2017-10-26 09:14:31 nFileVersion = 130000
2017-10-26 09:14:31 Keys: 113 plaintext, 0 encrypted, 7 w/ metadata, 113 total
2017-10-26 09:14:32  wallet                  515ms
2017-10-26 09:14:32

************************
EXCEPTION: St13runtime_error       
GenerateNewKey: AddKey failed       
C:\Program Files\Bitcoin\bitcoin-qt.exe in Runaway exception       

2017-10-26 09:14:38 CDBEnv::EnvShutdown: Error -30974 shutting down database environment: DB_RUNRECOVERY: Fatal error, run database recovery
member
Activity: 77
Merit: 10
Quote
2017-10-26 08:46:19
2017-10-26 08:46:19 Bitcoin version v0.15.0.1
2017-10-26 08:46:19 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2017-10-26 08:46:19 Assuming ancestors of block 0000000000000000003b9ce759c2a087d52abc4266f8f4ebd6d768b89defa50a have valid signatures.
2017-10-26 08:46:19 Using the 'standard' SHA256 implementation
2017-10-26 08:46:20 Default data directory C:\Users\xxxxxx\AppData\Roaming\Bitcoin
2017-10-26 08:46:20 GUI: "registerShutdownBlockReason: Successfully registered: Bitcoin Core didn't yet exit safely..."
2017-10-26 08:46:20 Using data directory C:\Users\xxxxxx\Desktop\Bitcoin Wallet
2017-10-26 08:46:20 Using config file C:\Users\xxxxxx\Desktop\Bitcoin Wallet\bitcoin.conf
2017-10-26 08:46:20 Using at most 125 automatic connections (2048 file descriptors available)
2017-10-26 08:46:20 Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2017-10-26 08:46:20 Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2017-10-26 08:46:20 Using 4 threads for script verification
2017-10-26 08:46:20 init message: Verifying wallet(s)...
2017-10-26 08:46:20 Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
2017-10-26 08:46:20 Using wallet wallet.dat
2017-10-26 08:46:20 CDBEnv::Open: LogDir=C:\Users\xxxxxx\Desktop\Bitcoin Wallet\database ErrorFile=C:\Users\xxxxxx\Desktop\Bitcoin Wallet\db.log
2017-10-26 08:46:20 scheduler thread start
2017-10-26 08:46:20 Cache configuration:
2017-10-26 08:46:20 * Using 2.0MiB for block index database
2017-10-26 08:46:20 * Using 8.0MiB for chain state database
2017-10-26 08:46:20 * Using 290.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2017-10-26 08:46:20 init message: Loading block index...
2017-10-26 08:46:20 Opening LevelDB in C:\Users\xxxxxx\Desktop\Bitcoin Wallet\blocks\index
2017-10-26 08:46:21 Opened LevelDB successfully
2017-10-26 08:46:21 Using obfuscation key for C:\Users\xxxxxx\Desktop\Bitcoin Wallet\blocks\index: 0000000000000000
2017-10-26 08:46:32 LoadBlockIndexDB: last block file = 1042
2017-10-26 08:46:32 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=96, size=69957200, heights=491713...491822, time=2017-10-25...2017-10-26)
2017-10-26 08:46:32 Checking all blk files are present...
2017-10-26 08:46:33 LoadBlockIndexDB: transaction index disabled
2017-10-26 08:46:33 Opening LevelDB in C:\Users\xxxxxx\Desktop\Bitcoin Wallet\chainstate
2017-10-26 08:46:33 Opened LevelDB successfully
2017-10-26 08:46:33 Using obfuscation key for C:\Users\xxxxxx\Desktop\Bitcoin Wallet\chainstate: dc3087dba2ad642e
2017-10-26 08:46:33 Loaded best chain: hashBestChain=00000000000000000080d70ed46b5f912ea0f0ba22c0d097be52c0fb8586e2b7 height=491822 date=2017-10-26 08:42:16 progress=0.999997
2017-10-26 08:46:33 init message: Rewinding blocks...
2017-10-26 08:46:38 init message: Verifying blocks...
2017-10-26 08:46:38 Verifying last 6 blocks at level 3
2017-10-26 08:46:38 [0%]...[16%]...[33%]...[50%]...[66%]...[83%]...[99%]...[DONE].
2017-10-26 08:46:42 No coin database inconsistencies in last 7 blocks (7711 transactions)
2017-10-26 08:46:42  block index           21591ms
2017-10-26 08:46:42 init message: Loading wallet...
2017-10-26 08:46:42 nFileVersion = 130000
2017-10-26 08:46:42 Keys: 113 plaintext, 0 encrypted, 7 w/ metadata, 113 total
2017-10-26 08:46:42  wallet                  327ms
2017-10-26 08:46:42

************************
EXCEPTION: St13runtime_error       
GenerateNewKey: AddKey failed       
C:\Program Files\Bitcoin\bitcoin-qt.exe in Runaway exception       

2017-10-26 08:46:49 CDBEnv::EnvShutdown: Error -30974 shutting down database environment: DB_RUNRECOVERY: Fatal error, run database recovery
staff
Activity: 3458
Merit: 6793
Just writing some code
Can you post full the debug.log file for Bitcoin Core?
member
Activity: 77
Merit: 10
Ok after re-opening the dogecoin core wallet a bunch of times (after -salvagewallet) suddenly all my coins are back. But so is the problem where the wallet app crashes after running for a little while.

This is on a brand new machine, freshly synced to the dogecoin block chain, this is not a hardware issue.



On to bitcoin, I did the same thing and the new salvaged wallet is just blank. It is also on this new machine, freshly sync'd to the blockchain. The app isn't crashes but if I swap in my old corrupt wallet, it starts crashing again. If salvagewallet is broken on bitcoincore, how do I get my coins out?

And a more important question, why is it that every wallet I use goes bad? Are these wallets just not compatible with OS X? I used to keep them running in the background on my main desktop, which basically never crashes, and we very rarely have power outages. And yet, nothing but problems. Should I be running these wallets on windows instead? That will be inconvenient but if the wallet apps are more stable, I'll do it if I have to.
staff
Activity: 3458
Merit: 6793
Just writing some code
I'm back and trying to get this going again. I just tried -salvagewallet for the first time (this on dogecoin.app, not bitcoin yet).

This is on a new machine with new versions of the apps, freshly synced to their respective blockchains (which took about 2 months for bitcoin).

So I ran -salvagewallet on my dogecoin wallet. It did something that didn't take very long at all. Then after a minute or so, it quit and left me with wallet.242340234.back and wallet.dat. So I fired up dogecoin core.app and once it rescanned everything, I had..... an empty wallet. Which kind of makes sense since the .bak wallet was 12 MB and the new one, presumably the restored one, was a few KB.

Am I doing something wrong here? There's almost no instructions on the web for how to use the -salvagewallet feature, beyond "just use -salvagewellet".
Don't use -salvagewallet in Bitcoin Core. It is broken and will likely corrupt your wallet further (these are known issues for which we are trying to fix, but salvaging corrupted wallets is a dangerous process in general).

Anyways, I don't think your wallet is corrupted here.

Have you tried reindexing the blockchain? Or completely resyncing the blockchain?
member
Activity: 77
Merit: 10
I'm back and trying to get this going again. I just tried -salvagewallet for the first time (this on dogecoin.app, not bitcoin yet).

This is on a new machine with new versions of the apps, freshly synced to their respective blockchains (which took about 2 months for bitcoin).

So I ran -salvagewallet on my dogecoin wallet. It did something that didn't take very long at all. Then after a minute or so, it quit and left me with wallet.242340234.back and wallet.dat. So I fired up dogecoin core.app and once it rescanned everything, I had..... an empty wallet. Which kind of makes sense since the .bak wallet was 12 MB and the new one, presumably the restored one, was a few KB.

Am I doing something wrong here? There's almost no instructions on the web for how to use the -salvagewallet feature, beyond "just use -salvagewellet".
hero member
Activity: 882
Merit: 533
Computer  A: wallet.dat is corrupted, you should :

(found for windows)
1) create a folder named protoalt and keep it's path in mind
2)Copy all the files except your wallet.dat into the new folder
3) Create a .bat .sh to start the alternate you have created
3)start your client with -salvagewallet, this does exactly that.
4) once your wallet is recovered, start the alternate client, it will create a new wallet for you.
5) send coins to new wallet and use it as main one now.

Computer B: Database corruption, relaunch core with reindex=1 in bitcoin.conf and try it.

These are brand new wallets, I'm trying to get the app to sync from scratch, totally clean and fresh. I do have my old wallet files but this is before I even get to the point of trying to get at those coins.

no problem, you can go with it even if new wallet.dat, sometimes it happens on fresh install, either on mac windows, linux or any other.
member
Activity: 77
Merit: 10
Computer  A: wallet.dat is corrupted, you should :

(found for windows)
1) create a folder named protoalt and keep it's path in mind
2)Copy all the files except your wallet.dat into the new folder
3) Create a .bat .sh to start the alternate you have created
3)start your client with -salvagewallet, this does exactly that.
4) once your wallet is recovered, start the alternate client, it will create a new wallet for you.
5) send coins to new wallet and use it as main one now.

Computer B: Database corruption, relaunch core with reindex=1 in bitcoin.conf and try it.

These are brand new wallets, I'm trying to get the app to sync from scratch, totally clean and fresh. I do have my old wallet files but this is before I even get to the point of trying to get at those coins.
hero member
Activity: 882
Merit: 533
Computer  A: wallet.dat is corrupted, you should :

(found for windows)
1) create a folder named protoalt and keep it's path in mind
2)Copy all the files except your wallet.dat into the new folder
3) Create a .bat .sh to start the alternate you have created
3)start your client with -salvagewallet, this does exactly that.
4) once your wallet is recovered, start the alternate client, it will create a new wallet for you.
5) send coins to new wallet and use it as main one now.

Computer B: Database corruption, relaunch core with reindex=1 in bitcoin.conf and try it.
member
Activity: 77
Merit: 10
Oh and other wallets sync up and stay synced no problem. Litecoin, Dogecoin core wallets both never had a problem. It's only bitcoin, and it's every time it tries to sync up.
member
Activity: 77
Merit: 10
Well i can't speak for the log, but the application itself gave me multiple different error dialog windows as it was crashing. It may very well have all been from the same cause. This is what has been happening any time I try to sink up the bitcoin wallet on any Mac. Has ANYONE been able to run bitcoin core on Mac lately? I'm suspecting it is a problem with the application itself. It always makes it to about this point then fails. Among the many reasons I know its now a hardware problem with the Mac, is that if it were, it would happen at random times. Plus the fact that I use this computer all day every day and it has no problems, even when it's doing intensive work, of which this bitcoin wallet absolutely is not.
legendary
Activity: 4130
Merit: 1307
Ok here we go...

Computer A:
An i5 Mac mini running 10.12.3 and 4 GB of RAM.
You say 4 GB isn't enough, but the memory pressure never gets outside of the green zone, so this must be crashing long before RAM becomes a factor. This one doesn't crash, it just goes unresponsive and never comes back.

Log Snippet:
http://pastebin.com/DcR0kwCt



Computer B:
An i7 quad core Mac mini running 10.12.3 with 16 GB of RAM.  This one crashes hard with lots of application errors on it's way out.

Log Snippet:
http://pastebin.com/5KUWYgck



That's all I have. My other computers are i5 laptops very similar to computer A. I have one older Mac Pro with 20 GB of RAM and xeon CPUs, but Bitcoin Core requires 10.8 or newer, and that old Mac can only run 10.7.

On the second one, I only see one application error, not "lots" - just a notification that the database is corrupted:
2017-03-24 17:24:14 Corruption: block checksum mismatch
2017-03-24 17:24:14 *** System error while flushing: Database corrupted


As far as the first one, I haven't tried any recent version of bitcoin on a Mac with less than 8GB and usually 16GB of RAM.  I too suspect that achow101 is correct that it is a memory issue on the first machine. 

Have you tried Apple Hardware Test (https://support.apple.com/en-us/HT201257) on either machine with the extended testing to see if you do indeed have no hardware problems? 


member
Activity: 77
Merit: 10
Ok here we go...

Computer A:
An i5 Mac mini running 10.12.3 and 4 GB of RAM.
You say 4 GB isn't enough, but the memory pressure never gets outside of the green zone, so this must be crashing long before RAM becomes a factor. This one doesn't crash, it just goes unresponsive and never comes back.

Log Snippet:
http://pastebin.com/DcR0kwCt



Computer B:
An i7 quad core Mac mini running 10.12.3 with 16 GB of RAM.  This one crashes hard with lots of application errors on it's way out.

Log Snippet:
http://pastebin.com/5KUWYgck



That's all I have. My other computers are i5 laptops very similar to computer A. I have one older Mac Pro with 20 GB of RAM and xeon CPUs, but Bitcoin Core requires 10.8 or newer, and that old Mac can only run 10.7.
member
Activity: 77
Merit: 10
Im generating debug logs from both machines. The app on the 4 GB machine doesn't crash so much as it just freezes solid, and I mean solid. Repeatably. But I don't think it's a RAM issue, as only about half the RAM is even in use. Very low "memory pressure".

I'm running the other Mac now, syncing up the block chain from scratch with a fresh wallet. This will take a few days, I'll return with more into once this is done.
staff
Activity: 3458
Merit: 6793
Just writing some code
And bitcoin wallets are NOT that resources intensive.
Bitcoin Core is because it is also a full node. Verifying and relaying every single transaction and block is quite resource intensive.

I do photoshop work that uses tons of memory and maxes out most of my CPU. Bitcoin is a lightweight compared to that.
But to answer your question, one of the computers has 16 GB of RAM, the other has 4 GB.
One is a dual core i5, the other is a quad core i7.
Both are 2012 Mac minis with intel HD 4000 graphics.
I don't have any kind of active firewall, just a standard router.
Are both of your computers crashing? Bitcoin Core will crash with the 4 GB RAM one as 4 GB is no longer enough memory to keep a node running. It will run into an OOM error and crash.

Core shouldn't be crashing on the 16 GB RAM one unless there is some other issue at hand.
member
Activity: 77
Merit: 10
That file is pretty big for a text file so I'm going to start a fresh one, let the app crash again, then repost when that's done... hopefully tomorrow.

As far as hardware, I can assure you it's not a hardware issue. My Macs are having no problems whatsoever, other than bitcoin. And bitcoin wallets are NOT that resources intensive. I do photoshop work that uses tons of memory and maxes out most of my CPU. Bitcoin is a lightweight compared to that.
But to answer your question, one of the computers has 16 GB of RAM, the other has 4 GB.
One is a dual core i5, the other is a quad core i7.
Both are 2012 Mac minis with intel HD 4000 graphics.
I don't have any kind of active firewall, just a standard router.
hero member
Activity: 882
Merit: 533
Ok now I really don't know what to do. Even version 0.14 will crash before it gets finished syncing to the network. Its a totally new wallet on a totally new machine and it can't sync up.

Could you send a pastebin with the content of the debug.conf ? maybe it will give some clues about what is happening.
Could also please tell us your network configuration ? do you have a firewall ?

I personally never had any problem with bitcoin core, but as achow said, sometimes hardware problems apear. could you also give more details about your hardware, how much RAM you have ?
member
Activity: 77
Merit: 10
Ok now I really don't know what to do. Even version 0.14 will crash before it gets finished syncing to the network. Its a totally new wallet on a totally new machine and it can't sync up.
Pages:
Jump to: