Skip to content

Issue #1872 fix - FUSE-T usb stick unmounting - #1876

Draft
askaine wants to merge 1 commit into
veracrypt:masterfrom
askaine:usb-stick-unmounting-volume-bug
Draft

askaine wants to merge 1 commit into
veracrypt:masterfrom
askaine:usb-stick-unmounting-volume-bug

Conversation

@askaine

@askaine askaine commented Sep 15, 2026

Copy link
Copy Markdown

Fix macOS FUSE-T process leak preventing volume unmount and USB ejection

Summary

When dismounting a VeraCrypt volume on macOS using a FUSE-T build, the background user-space NFS daemon (go-nfsv4) often fails to exit its event loop (fuse_main()). As a result, active file descriptors remain open on the underlying block device, causing hdiutil detach and subsequent disk ejection (diskutil eject) to fail with "resource busy" or unmount dissent errors.

Error Log / Reproduction

Attempting to eject the underlying drive in the terminal after unmounting via the VeraCrypt GUI results in:

Unmount of disk4 failed: at least one volume could not be unmounted
Unmount was dissented by PID 9572 (/Library/Application Support/fuse-t/bin/go-nfsv4-1.2.7)
Dissenter parent PPID 1 (/sbin/launchd)

Proposed Changes

PID Tracking (src/Core/Unix/FuseService.cpp): Write the FUSE service process ID to /tmp/veracrypt_fuset_slot_.pid immediately before entering fuse_main().

Forced Teardown

(src/Core/Unix/CoreMacOs.cpp): In CoreMacOSX::DismountVolume, check for the saved PID file and terminate the lingering go-nfsv4 / FUSE-T daemon before issuing hdiutil detach. This guarantees file handles are released prior to device detachment.

Testing & Verification Request

Note: These changes were authored and cross-referenced from a Windows environment. Opening as a Draft PR to request code review and runtime testing from maintainers or macOS users with FUSE-T setups.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant