Bitcoin Forum
December 29, 2025, 08:11:19 PM *
News: Latest Bitcoin Core release: 30.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Core 26.0 Crash on Macbook - Error opening block database.  (Read 135 times)
Mebits3 (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 2


View Profile
December 24, 2023, 03:45:58 PM
 #1

Hello all,

Is there any way of recovering the block database without downloading the entire thing from scratch?

My Macbook crashed for some reason and now Bitcoin Core comes up with the error: "Error opening block database. Do you want to rebuild the block database now?"

I continued but it has started verifying all block from the beginning.

I am running the node from an external drive if that's important. I wonder if the computer crashed because of a memory or related issue due to the external hard drive setup.

Thanks

Steve

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3850
Merit: 7535


Just writing some code


View Profile WWW
December 24, 2023, 05:11:26 PM
 #2

What version of MacOS are you using? Possibly the same issue as https://github.com/bitcoin/bitcoin/issues/28552

Is there any way of recovering the block database without downloading the entire thing from scratch?
Rebuilding the block database doesn't redownload anything. It is reading all of the blocks from disk and building the block index, so the software gives the same progress bar as syncing, but no downloading happens until it reaches the end of what's on disk.

Mebits3 (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 2


View Profile
December 24, 2023, 05:45:40 PM
Last edit: April 30, 2025, 09:11:27 AM by mprep
 #3

Thanks, I'm still using Ventura 13.6.

However, my drive is ExFAT (and the article suggests it should be APFS), so maybe that is the issue?

Okay, So I'll just let Bitcoin Core continue processing the headers, and then hopefully it will retain most of whats already on disk?

S



After syncing the headers it has just started downloading all blocks from the beginning Sad

Could it not be recognising the blocks folder at all if it seen as corrupt?


[moderator's note: consecutive posts merged]
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3850
Merit: 7535


Just writing some code


View Profile WWW
December 24, 2023, 08:37:15 PM
 #4

After syncing the headers it has just started downloading all blocks from the beginning Sad

Could it not be recognising the blocks folder at all if it seen as corrupt?

Why do you assume that it is downloading all blocks? When it is reindexing, it will say something about syncing, but there won't be any network activity. You should be able to disable networking (either OS, or in Bitcoin Core) and it will still continue to be "downloading".

alecfisker
Member
**
Offline Offline

Activity: 105
Merit: 17


View Profile
December 26, 2023, 01:03:56 PM
 #5

Hello all,
Is there any way of recovering the block database without downloading the entire thing from scratch?
My Macbook crashed for some reason and now Bitcoin Core comes up with the error: "Error opening block database. Do you want to rebuild the block database now?"
I continued but it has started verifying all block from the beginning.
I am running the node from an external drive if that's important. I wonder if the computer crashed because of a memory or related issue due to the external hard drive setup.
Thanks
Steve
post hardware profile, crash log, could be free memory related
does system have swap file enabled
Mebits3 (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 2


View Profile
December 26, 2023, 01:30:21 PM
 #6

Okay so I left it to continue "indexing files on Disk" and it did sort out the block database without downloading everything again. I would say it is worth noting that it may seem like this should be a quick process, however it still took many hours so I needed to be more patient. It didn't however take many days as the case when first downloading the blockchain.

I'm not sure if swap file is enabled but I haven't changed anything from default on that front.

Maybe if it crashes again it might be worth looking into?

Thanks for the help guys

S
satscraper
Legendary
*
Offline Offline

Activity: 1330
Merit: 2430



View Profile
December 27, 2023, 10:09:30 AM
 #7

Okay so I left it to continue "indexing files on Disk" and it did sort out the block database without downloading everything again. I would say it is worth noting that it may seem like this should be a quick process, however it still took many hours so I needed to be more patient. It didn't however take many days as the case when first downloading the blockchain.

I'm not sure if swap file is enabled but I haven't changed anything from default on that front.

Maybe if it crashes again it might be worth looking into?

Thanks for the help guys

S

The speed of reindexing depends on the size of dbcash. Taken  dbcash=1/4 RAM as a  rule of thumb  I would advocate dbcash=4096 (for 16 GB RAM).

Some times reindex-chainstate  (and even reindex which is more slower process then reindex-chainstate ) doesn't help to restore corrupted database. I faced it just a few days ago when attempting to recover blockchain data  somehow corrupted in the course of  copying them from my other SSD. Had to do it all over again and the second attempt at copying was a success.



▄▄███████████████████▄▄
▄███████████████████████▄
████████████████████████
█████████████████████████
████████████████████████
████████████▀██████▀████
████████████████████████
█████████▄▄▄▄███████████
██████████▄▄▄████████████
████████████████████████
████████████████▀▀███████
▀███████████████████████▀
▀▀███████████████████▀▀
 
 EARNBET 
██
██
██
██
██
██
██
██
██
██
██
██
██
███████▄▄███████████
████▄██████████████████
██▀▀███████████████▀▀███
▄████████████████████████
▄▄████████▀▀▀▀▀████████▄▄██
███████████████████████████
█████████▌██▀████████████
███████████████████████████
▀▀███████▄▄▄▄▄█████████▀▀██
▀█████████████████████▀██
██▄▄███████████████▄▄███
████▀██████████████████
███████▀▀███████████
██
██
██
██
██
██
██
██
██
██
██
██
██


▄▄▄
▄▄▄███████▐███▌███████▄▄▄
█████████████████████████
▀████▄▄▄███████▄▄▄████▀
█████████████████████
▐███████████████████▌
███████████████████
███████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

 King of The Castle 
 $200,000 in prizes
██
██
██
██
██
██
██
██
██
██
██
██
██

 62.5% 

 
RAKEBACK
BONUS
nc50lc
Legendary
*
Offline Offline

Activity: 3010
Merit: 8182


Self-proclaimed Genius


View Profile
December 27, 2023, 12:58:26 PM
 #8

Some times reindex-chainstate  (and even reindex which is more slower process then reindex-chainstate ) doesn't help to restore corrupted database. I faced it just a few days ago when attempting to recover blockchain data  somehow corrupted in the course of  copying them from my other SSD. Had to do it all over again and the second attempt at copying was a success.
That depends on the which database is corrupted;
if it's just the UTXO set, the fast --reindex-chainstate should be enough.
if it's the block index or the blockchain, then --reindex-chainstate wont be useful in that case.

Perhaps the "corrupted copy" had a different issue,
this is why checking the debug.log for errors should be the first step before applying those command line options.

The speed of reindexing depends on the size of dbcash.
May be a typo because it should be dbcache.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
satscraper
Legendary
*
Offline Offline

Activity: 1330
Merit: 2430



View Profile
December 28, 2023, 09:30:33 AM
Last edit: December 28, 2023, 10:36:49 AM by satscraper
 #9

The speed of reindexing depends on the size of dbcash.
May be a typo because it should be dbcache.

Sure dbcache rather than dbcash.

Fault of my brain which thinks all time think of the lack of cash. Sad


Some times reindex-chainstate  (and even reindex which is more slower process then reindex-chainstate ) doesn't help to restore corrupted database. I faced it just a few days ago when attempting to recover blockchain data  somehow corrupted in the course of  copying them from my other SSD. Had to do it all over again and the second attempt at copying was a success.
That depends on the which database is corrupted;
if it's just the UTXO set, the fast --reindex-chainstate should be enough.
if it's the block index or the blockchain, then --reindex-chainstate wont be useful in that case.
Perhaps the "corrupted copy" had a different issue,
this is why checking the debug.log for errors should be the first step before applying those command line options.


Yeah, forgot to look inside debug.log and, thus,  proceeded with the second copy attempt.  

However the time I have spent for the full-blockchain- coping (involved two fast SSDs) was far less than time of reindexing.

Thus, I'm not upset. Smiley

▄▄███████████████████▄▄
▄███████████████████████▄
████████████████████████
█████████████████████████
████████████████████████
████████████▀██████▀████
████████████████████████
█████████▄▄▄▄███████████
██████████▄▄▄████████████
████████████████████████
████████████████▀▀███████
▀███████████████████████▀
▀▀███████████████████▀▀
 
 EARNBET 
██
██
██
██
██
██
██
██
██
██
██
██
██
███████▄▄███████████
████▄██████████████████
██▀▀███████████████▀▀███
▄████████████████████████
▄▄████████▀▀▀▀▀████████▄▄██
███████████████████████████
█████████▌██▀████████████
███████████████████████████
▀▀███████▄▄▄▄▄█████████▀▀██
▀█████████████████████▀██
██▄▄███████████████▄▄███
████▀██████████████████
███████▀▀███████████
██
██
██
██
██
██
██
██
██
██
██
██
██


▄▄▄
▄▄▄███████▐███▌███████▄▄▄
█████████████████████████
▀████▄▄▄███████▄▄▄████▀
█████████████████████
▐███████████████████▌
███████████████████
███████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

 King of The Castle 
 $200,000 in prizes
██
██
██
██
██
██
██
██
██
██
██
██
██

 62.5% 

 
RAKEBACK
BONUS
NotATether
Legendary
*
Offline Offline

Activity: 2198
Merit: 9185


Trêvoid █ No KYC-AML Crypto Swaps


View Profile WWW
December 28, 2023, 10:15:17 AM
 #10

The thing I get from this is that it is is largely a macOS issue. Specifically with Sonoma where Apple said the implementations of MS filesystems have changed substantially.

Why these changes would crash an application doing lots of I/O is not clear to me at the moment.



Okay so I left it to continue "indexing files on Disk" and it did sort out the block database without downloading everything again. I would say it is worth noting that it may seem like this should be a quick process, however it still took many hours so I needed to be more patient. It didn't however take many days as the case when first downloading the blockchain.

I'm not sure if swap file is enabled but I haven't changed anything from default on that front.

Maybe if it crashes again it might be worth looking into?

Thanks for the help guys

S

Maybe if you find that Bitcoin Core is causing the Mac to use lots of swap, it could escalate the risk of some I/O fault happening to Core again. But I wouldn't disable it unless the machine only runs Bitcoin Core.

.
 betpanda.io 
 
ANONYMOUS & INSTANT
.......ONLINE CASINO.......
▄███████████████████████▄
█████████████████████████
█████████████████████████
████████▀▀▀▀▀▀███████████
████▀▀▀█░▀▀░░░░░░▄███████
████░▄▄█▄▄▀█▄░░░█▄░▄█████
████▀██▀░▄█▀░░░█▀░░██████
██████░░▄▀░░░░▐░░░▐█▄████
██████▄▄█░▀▀░░░█▄▄▄██████
█████████████████████████
█████████████████████████
█████████████████████████
▀███████████████████████▀
▄███████████████████████▄
█████████████████████████
██████████▀░░░▀██████████
█████████░░░░░░░█████████
███████░░░░░░░░░███████
████████░░░░░░░░░████████
█████████▄░░░░░▄█████████
███████▀▀▀█▄▄▄█▀▀▀███████
██████░░░░▄░▄░▄░░░░██████
██████░░░░█▀█▀█░░░░██████
██████░░░░░░░░░░░░░██████
█████████████████████████
▀███████████████████████▀
▄███████████████████████▄
█████████████████████████
██████████▀▀▀▀▀▀█████████
███████▀▀░░░░░░░░░███████
██████░░░░░░░░░░░░▀█████
██████░░░░░░░░░░░░░░▀████
██████▄░░░░░░▄▄░░░░░░████
████▀▀▀▀▀░░░█░░█░░░░░████
████░▀░▀░░░░░▀▀░░░░░█████
████░▀░▀▄░░░░░░▄▄▄▄██████
█████░▀░█████████████████
█████████████████████████
▀███████████████████████▀
.
SLOT GAMES
....SPORTS....
LIVE CASINO
▄░░▄█▄░░▄
▀█▀░▄▀▄░▀█▀
▄▄▄▄▄▄▄▄▄▄▄   
█████████████
█░░░░░░░░░░░█
█████████████

▄▀▄██▀▄▄▄▄▄███▄▀▄
▄▀▄█████▄██▄▀▄
▄▀▄▐▐▌▐▐▌▄▀▄
▄▀▄█▀██▀█▄▀▄
▄▀▄█████▀▄████▄▀▄
▀▄▀▄▀█████▀▄▀▄▀
▀▀▀▄█▀█▄▀▄▀▀

Regional Sponsor of the
Argentina National Team
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!