Skip to content

Conversation

@adityamaru
Copy link
Contributor

@adityamaru adityamaru commented Feb 6, 2026

Summary

  • Root cause: git gc --auto defaults to gc.autoDetach=true, forking a background daemon that keeps running with file handles on the mirror mount, causing umount to fail with EBUSY (exit code 32)
  • Logs: descriptinc/descript showed 4 git processes holding the mount through 3 retry attempts
  • Fix: Pass -c gc.autoDetach=false to force synchronous GC execution
  • Timeout: Increased GC_TIMEOUT_SECS from 60s to 120s (measured ~74s on this repo)

Test plan

  • Verified GC completes synchronously with gc.autoDetach=false
  • Confirmed unmount succeeds after GC finishes
  • Measured GC duration: 74s for 51 packs + 1019 loose objects on 6.4GB mirror

🤖 Generated with Claude Code


Note

Low Risk
Small, targeted change to the git GC invocation and timeout; primary risk is longer cleanup time or behavior differences on older git versions.

Overview
Prevents sticky-disk unmount failures caused by git gc --auto daemonizing in the background.

runMirrorGC now forces synchronous execution via git -c gc.autoDetach=false gc --auto, and the GC timeout is increased from 60s to 120s (mirrored in dist/index.js).

Written by Cursor Bugbot for commit 4c2bc4c. This will update automatically on new commits. Configure here.

… unmount

git gc --auto defaults to gc.autoDetach=true, which forks a background daemon
for the actual garbage collection work. The parent returns immediately with
exit code 0, but the daemonized child (and its sub-processes) keep running with
cwd and mmap'd pack files on the mirror mount. This causes subsequent umount
attempts to fail with EBUSY (exit code 32).

Root cause identified in descriptinc/descript: 4 git processes (PIDs 10316-10319)
with cwd inside the mirror, preventing unmount despite 3 retry attempts with
exponential backoff.

Fix: Pass -c gc.autoDetach=false to force synchronous GC execution so it fully
completes before proceeding to mount cleanup.

Also increase GC_TIMEOUT_SECS from 60s to 120s: measured GC on this repo takes
~74 seconds to repack 51 packs + 1019 loose objects.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@adityamaru adityamaru merged commit fb9e5da into main Feb 6, 2026
14 checks passed
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