Commit fb9e5da
fix(blacksmith-cache): prevent git gc background daemon from blocking unmount (#22)
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>1 parent 2f7f0dc commit fb9e5da
2 files changed
Lines changed: 30 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
421 | 434 | | |
422 | 435 | | |
423 | 436 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
482 | 486 | | |
483 | 487 | | |
484 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
485 | 498 | | |
486 | 499 | | |
487 | 500 | | |
| |||
0 commit comments