Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes constantly on Mac OS Sonoma when using an ExFAT external SSD #28552

Closed
1 task done
gawlk opened this issue Sep 29, 2023 · 11 comments
Closed
1 task done

Crashes constantly on Mac OS Sonoma when using an ExFAT external SSD #28552

gawlk opened this issue Sep 29, 2023 · 11 comments

Comments

@gawlk
Copy link

gawlk commented Sep 29, 2023


⚠️ Fix: Use APFS instead of ExFAT disk format ⚠️


Is there an existing issue for this?

  • I have searched the existing issues

Current behaviour

Both bitcoind and Bitcoin Core crash in various way, sometimes it's a corrupted block, other times there are issues with the indexes or the chain state. Tried reindexing without success.

Tried on different computers one on 14.0 and the other on 14.1.

It seem to only crash when using external storage, I didn't run it for very long since I don't have the space for but it worked without issue when leaving the default datadir.

Tried with Bitcoin Core 24.1, 25.0, and bitcoind 25.0 and built from source, reindexing and restarting from scratch.
It seems to always fail around mid 2012

It worked perfectly on both machines with Mac OS Ventura (13.X) and Bitcoin Core 24.1 with the same external SSD

Expected behaviour

I expect the software to run without crashing

Steps to reproduce

Update a Mac to Sonoma (14.X)

Select an external SSD as storage for datadir

Run bitcoind until it crashes

Relevant log output

Here's the most common type of errors

date='2012-06-05T09:58:55Z' progress=0.004282 cache=229.8MiB(1876048txo)
2023-09-29T19:49:36Z UpdateTip: new best=00000000000007656ea41bf3b7157b4852d548dad3353aed95803230c4c371fd height=183104 version=0x00000001 log2_work=68.224759 tx=3756934 date='2012-06-05T10:22:50Z' progress=0.004283 cache=229.8MiB(1876231txo)
2023-09-29T19:49:36Z UpdateTip: new best=00000000000007f347d5d728664c21f549494207e4b94a0b6a89c2be6e327255 height=183105 version=0x00000001 log2_work=68.224787 tx=3757624 date='2012-06-05T10:30:01Z' progress=0.004283 cache=229.8MiB(1876500txo)
2023-09-29T19:49:36Z ERROR: ReadBlockFromDisk: Errors in block header at FlatFilePos(nFile=12, nPos=948913)
2023-09-29T19:49:36Z *** Failed to read block
2023-09-29T19:49:36Z Error: A fatal internal error occurred, see debug.log for details
Error: A fatal internal error occurred, see debug.log for details
2023-09-29T19:49:36Z ERROR: ProcessNewBlock: ActivateBestChain failed (Failed to read block)
2023-09-29T19:49:36Z tor: Thread interrupt
2023-09-29T19:49:36Z Shutdown: In progress...
2023-09-29T19:49:36Z msghand thread exit
2023-09-29T19:49:36Z addcon thread exit
2023-09-29T19:49:36Z torcontrol thread exit
2023-09-29T19:49:36Z net thread exit
2023-09-29T19:49:37Z opencon thread exit
2023-09-29T19:49:38Z DumpAnchors: Flush 0 outbound block-relay-only peer addresses to anchors.dat started
2023-09-29T19:49:38Z DumpAnchors: Flush 0 outbound block-relay-only peer addresses to anchors.dat completed (0.01s)
2023-09-29T19:49:38Z scheduler thread exit
2023-09-29T19:49:38Z Writing 0 unbroadcast transactions to disk.
2023-09-29T19:49:38Z Dumped mempool: 0.00129013s to copy, 0.00299875s to dump
2023-09-29T19:49:41Z Shutdown: done

How did you obtain Bitcoin Core

Compiled from source

What version of Bitcoin Core are you using?

25.0

Operating system and version

MacOS Sonoma 14.1

Machine specifications

Mac mini / MBP
Mac OS 14.X
M1
External SSD (Samsung T7 Shield)

@hebasto
Copy link
Member

hebasto commented Sep 30, 2023

Similar to #26455?

@gawlk
Copy link
Author

gawlk commented Sep 30, 2023

@hebasto Hi ! I actually also had that error at the time before it was fixed and everything ran fine until I updated to Sonoma.
As far as I remember I never saw that error again. Like I said it crashes because of a corrupted block found or an error with the index or the block header

@hebasto
Copy link
Member

hebasto commented Sep 30, 2023

From https://developer.apple.com/documentation/macos-release-notes/macos-14-release-notes#File-System:

The implementations of the exfat and msdos file systems on macOS have changed; these file systems are now provided by services running in user-space instead of by kernel extensions. If the application has explicit checks or support for either the exfat or msdos file systems, validate the applications with those file systems and report any issues.

@gawlk
Copy link
Author

gawlk commented Sep 30, 2023

So, if I understand that correctly it's much more a macOS issue than a bitcoin core one ?

@maflcko
Copy link
Member

maflcko commented Oct 1, 2023

Which file system are you using on the external drive?

@gawlk
Copy link
Author

gawlk commented Oct 1, 2023

Which file system are you using on the external drive?

Hi ! My bad I totally thought I did specify but exfat

@maflcko
Copy link
Member

maflcko commented Oct 1, 2023

It looks like exfat has issues on macOS. At least there are many similar reports, see for example #27972 (comment)

My recommendation would be to change the file system, but I don't have macOS to test, so I don't know what will work.

@gawlk
Copy link
Author

gawlk commented Oct 1, 2023

Very interesting, this issue didn't show up when I looked for similar ones. I'll try APFS then, thanks !

@gawlk
Copy link
Author

gawlk commented Oct 1, 2023

I confirm that when using the APFS format everything works fine

Maybe adding a Mac OS label would help people with the same problem to find this issue ?

@gawlk gawlk changed the title Crashes constantly on Mac OS Sonoma Crashes constantly on Mac OS Sonoma when using an exfat external SSD Oct 1, 2023
@gawlk gawlk changed the title Crashes constantly on Mac OS Sonoma when using an exfat external SSD Crashes constantly on Mac OS Sonoma when using an ExFAT external SSD Oct 1, 2023
@maflcko maflcko added the macOS label Oct 2, 2023
@fanquake
Copy link
Member

fanquake commented Oct 2, 2023

I guess we can close this for now. Maybe we can update some documentation to state that using exfat with macOS is not recommended?

@maflcko
Copy link
Member

maflcko commented Oct 5, 2023

An alternative would be for macOS to fix their software, but someone would have to figure out how to report bugs to them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants