I have VeraCrypt 1.26.29 installed on an M1 MAX MacBook Pro and an M5 MAX MacBook Pro. Attempts to open encrypted volumes on the M1 MAX MacBook Pro result in a VeraCrypt crash. I've spent a lot of time on this and with the help of Gemini, a description of the issue is pasted below. Should I send this to someone else?
Bug Report: macOS Fork-Safety Crash (SIGABRT in performForkChildInitialize) During Volume Mount
Summary:
Mounting a volume crashes VeraCrypt immediately with SIGABRT (Namespace OBJC, Code 1) due to macOS's fork-safety runtime enforcement.
Root Cause Analysis:
During the mount sequence, a background worker thread spawned by libfuse.2.dylib calls DASessionCreate (DiskArbitration.framework) to register the newly mounted volume with macOS.
Because DiskArbitration has not yet been initialized in the process, DASessionCreate triggers internal one-time initialization (pthread_once $\rightarrow$ __DAInitialize), which calls into CoreFoundation/Objective-C (-[__NSDictionaryM __setObject:forKey:]).
Since VeraCrypt spawns worker threads around a fork() boundary without an immediate exec(), the Objective-C runtime flags an uninitialized class initialization on the child side of the fork (performForkChildInitialize $\rightarrow$ initializeNonMetaClass) and aborts the process:
Workaround Verified:
Passing OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES into the environment resolves the crash and allows the volume to mount successfully.
Suggested Fix:
Pre-warm / initialize DiskArbitration (e.g., a dummy DASessionCreate or framework touch) on the main thread during initial application launch, prior to creating background worker threads or calling fork().
Alternatively, embed LSEnvironment with OBJC_DISABLE_INITIALIZE_FORK_SAFETY = YES inside the application bundle's Info.plist for macOS targets until background multi-threading around fork calls can be refactored.
Last edit: Dave Burbank 2 days ago
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have VeraCrypt 1.26.29 installed on an M1 MAX MacBook Pro and an M5 MAX MacBook Pro. Attempts to open encrypted volumes on the M1 MAX MacBook Pro result in a VeraCrypt crash. I've spent a lot of time on this and with the help of Gemini, a description of the issue is pasted below. Should I send this to someone else?
Bug Report: macOS Fork-Safety Crash (
SIGABRTinperformForkChildInitialize) During Volume MountEnvironment:
/usr/local/lib/libfuse.2.dylib/MFMount.framework 2.3)Summary:
Mounting a volume crashes VeraCrypt immediately with
SIGABRT(Namespace OBJC, Code 1) due to macOS's fork-safety runtime enforcement.Root Cause Analysis:
During the mount sequence, a background worker thread spawned by
libfuse.2.dylibcallsDASessionCreate(DiskArbitration.framework) to register the newly mounted volume with macOS.Because
DiskArbitrationhas not yet been initialized in the process,DASessionCreatetriggers internal one-time initialization (pthread_once$\rightarrow$__DAInitialize), which calls into CoreFoundation/Objective-C (-[__NSDictionaryM __setObject:forKey:]).Since VeraCrypt spawns worker threads around a
fork()boundary without an immediateexec(), the Objective-C runtime flags an uninitialized class initialization on the child side of the fork (performForkChildInitialize$\rightarrow$initializeNonMetaClass) and aborts the process:Workaround Verified:
Passing
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YESinto the environment resolves the crash and allows the volume to mount successfully.Suggested Fix:
DiskArbitration(e.g., a dummyDASessionCreateor framework touch) on the main thread during initial application launch, prior to creating background worker threads or callingfork().LSEnvironmentwithOBJC_DISABLE_INITIALIZE_FORK_SAFETY = YESinside the application bundle'sInfo.plistfor macOS targets until background multi-threading around fork calls can be refactored.Last edit: Dave Burbank 2 days ago