Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Summary
A checkpoint capture that times out leaves partial Git LFS temp files in .git/lfs/tmp. Nothing removes them, and the next turn's capture hits the same timeout and leaves more. On one repo this reached about 150 GB in about an hour and filled the disk. Other repos and builds on that volume then failed with "no space left on device".
This looks like the case left over from #9776 (stale index.lock) and #3646 (tmp_pack litter after timeouts). Both are closed, but the LFS temp files still leak on the current nightly.
Steps to reproduce
- Use a repo whose
.gitattributesroutes*.zipand*.npzthrough Git LFS (filter=lfs). - Put several GB of matching files in the working tree as untracked files. In our case that was a 3 GB folder of
.npzfiles next to a tracked 2.9 GB.zip. - Open a thread with that repo as its workspace and run a few turns.
- Watch
.git/lfs/tmp.
Expected behavior
A capture that is cut off cleans up the files its Git processes wrote. A capture that can't finish stops being retried every turn.
Actual behavior
- Each capture runs
git add -A -- .with a scratchGIT_INDEX_FILE. Untracked files have no stat data in that index, so git-lfs's clean filter copies each matching file into.git/lfs/tmpwhile hashing it. - The baseline capture has a 5 s budget (
BASELINE_CAPTURE_BUDGET), and other capture commands use the 30 sVcsProcessdefault. Hashing a few GB takes longer, sogit addis killed partway through. - git-lfs does not remove its temp file when its parent git process dies, so every killed capture strands one or more files of up to a few GB.
- Untracked blob reuse (
CheckpointUntrackedBlobs) is only recorded after a successful capture. A capture that never finishes therefore re-hashes the same files on every turn.
What we saw on the machine:
- Leftovers: 218 files in
.git/lfs/tmp, about 151 GB in total, all created within roughly 70 minutes. - New file cadence: a new file appeared about every 30 s, some of them 0 bytes and some 1 to 2.5 GB.
- The process behind each file was
git-lfs filter-process, whose parent wasgit -C <repo> ... add -A -- .withGIT_INDEX_FILE=<git-common-dir>/t3-checkpoint-index-<uuid>, started byt3 serve. - After the cleanup: deleting the leftovers, removing the large untracked files and refreshing the real index stopped it.
.git/lfs/tmpthen stayed empty.
Impact
Major degradation or frequent failure
Version or commit
0.1.12-nightly.20261123.5151
Environment
Linux 6.8, git 2.43.0, git-lfs 3.4.1, ext4
Suggested fix
When a capture's git add fails, times out or is interrupted, remove the .git/lfs/tmp entries created during that capture once its process tree has exited. The repo-wide timeout backoff that already exists for baselines could also cover the per-turn capture, so a capture that can never finish stops being retried every turn.
Activity