[Bug]: Background git fetch retries leak tmp_pack files in .git/objects/pack and can fill disk #1965
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/desktop
Steps to reproduce#
- Open T3 Code with a Git repository
- Leave the app open while it performs background Git status/upstream checks
- Put the repository in a state where those background
git fetchoperations repeatedly time out or fail - Observe
.git/objects/packover time tmp_pack_*files accumulate instead of being cleaned up, and disk usage keeps growing
Expected behavior#
Background Git fetch/status checks should either clean up temporary pack files on failure or avoid leaving them behind entirely. Repeated retries should not cause such destructive disk growth
Actual behavior#
T3 Code repeatedly ran background Git fetches that timed out, and each failed fetch left a tmp_pack_* file in .git/objects/pack. In my case this accumulated overnight until the drive filled. I found 5033 tmp_pack_* files totaling about 820.55 GiB in size
Impact#
Blocks work completely
Version or commit#
T3 Code 0.0.16 AppImage
Environment#
EndeavourOS (Arch-based Linux), kernel 6.17.8-arch1-1, T3 Code 0.0.16 AppImage, affected repo was on /mnt/sda2, mounted as NTFS (fuseblk)
Logs or stack traces#
[21:16:57.613] INFO (#94729): GitCommandError: Git command failed in GitCore.fetchUpstreamRefForStatus: git fetch --quiet --no-tags origin +refs/heads/main:refs/remotes/origin/main (/mnt/sda2/PROJECTS/Forks/MinecraftConsoles) - git fetch --quiet --no-tags origin +refs/heads/main:refs/remotes/origin/main timed out.
at onNone (file:///tmp/.mount_T3-Cod7BiBVD/resources/app.asar/apps/server/dist/index.mjs:19170:31)
at file:///tmp/.mount_T3-Cod7BiBVD/resources/app.asar/node_modules/effect/dist/Option.js:205:22
at Module.<anonymous> (file:///tmp/.mount_T3-Cod7BiBVD/resources/app.asar/node_modules/effect/dist/Function.js:94:18)
at Effect.fn (file:///tmp/.mount_T3-Cod7BiBVD/resources/app.asar/apps/server/dist/index.mjs:21987:9)
at Effect.fn (definition) (file:///tmp/.mount_T3-Cod7BiBVD/resources/app.asar/apps/server/dist/index.mjs:21474:29)
[21:17:33.629] INFO (#94812): GitCommandError: Git command failed in GitCore.fetchUpstreamRefForStatus: git fetch --quiet --no-tags origin +refs/heads/main:refs/remotes/origin/main (/mnt/sda2/PROJECTS/Forks/MinecraftConsoles) - git fetch --quiet --no-tags origin +refs/heads/main:refs/remotes/origin/main timed out.
at onNone (file:///tmp/.mount_T3-Cod7BiBVD/resources/app.asar/apps/server/dist/index.mjs:19170:31)
at file:///tmp/.mount_T3-Cod7BiBVD/resources/app.asar/node_modules/effect/dist/Option.js:205:22
at Module.<anonymous> (file:///tmp/.mount_T3-Cod7BiBVD/resources/app.asar/node_modules/effect/dist/Function.js:94:18)
at Effect.fn (file:///tmp/.mount_T3-Cod7BiBVD/resources/app.asar/apps/server/dist/index.mjs:21987:9)
at Effect.fn (definition) (file:///tmp/.mount_T3-Cod7BiBVD/resources/app.asar/apps/server/dist/index.mjs:21474:29)
Screenshots, recordings, or supporting files#
No response
Workaround#
Closing T3 Code stops the repeated background fetch attempts. Deleting the leaked tmp_pack_* files from .git/objects/pack reclaimed the disk space, and git fsck --full completed without fatal corruption afterward, best work around I have right now. Please let me know if you need any more information
OMetaVR(GitHub profile, opens in a new tab) added labelsbug
OMetaVR(GitHub profile, opens in a new tab) added labelsneeds-triage
juliusmarminge closed this
Sign in to join this conversation.