Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Garbage collection throwing errors
Garbage collection throwing errors [message #1783996] Wed, 21 March 2018 11:04 Go to next message
Radek Jakubowski is currently offline Radek JakubowskiFriend
Messages: 6
Registered: October 2015
Junior Member
I have couple of git repositories, very simple ones, where an application commits files, then pushes them to remote.

Recently I noticed that GC is throwing an error on one of the repos:
java.io.IOException: java.util.concurrent.ExecutionException: org.eclipse.jgit.api.errors.JGitInternalException: Could not rename file C:\Git\local_git_path\.git\objects\pack\gc_6359382903615634297.pack_tmp to C:\Git\local_git_path\.git\objects\pack\pack-89e1d2e3f986d22ea04be244a1683fbed984d8f0.pack

I have two questions:
1. Why this has happened?
2. How to resolve it programatically?
I tried run git gc from command line and unlink the file there but that is not an ultimate solution...

Couldn't find any information on this.

[Updated on: Wed, 21 March 2018 11:11]

Report message to a moderator

Re: Garbage collection throwing errors [message #1784047 is a reply to message #1783996] Wed, 21 March 2018 22:41 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1032
Registered: July 2009
Senior Member
Another process has an open file handle on the temporary file. This may be caused e.g. by a virus scanner
trying to scan the newly created file.
Re: Garbage collection throwing errors [message #1784142 is a reply to message #1784047] Thu, 22 March 2018 20:37 Go to previous messageGo to next message
Radek Jakubowski is currently offline Radek JakubowskiFriend
Messages: 6
Registered: October 2015
Junior Member
You are most likely right. I have checked which process has an open handle and it is a jvm of the application that commits the data.
Still doesn't explain why the GC is throwing the error...
Re: Garbage collection throwing errors [message #1784646 is a reply to message #1784142] Sat, 31 March 2018 22:40 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1032
Registered: July 2009
Senior Member
gc writes the new pack content to a temporary file and then uses atomic rename to make it a pack file.
This atomic rename fails on Windows if another process has an open file handle on this file.
Previous Topic:Facing Performance issue with JGIT add command with big repository
Next Topic:unable to install new softwares
Goto Forum:
  


Current Time: Mon Sep 24 03:18:17 GMT 2018

Powered by FUDForum. Page generated in 0.01681 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top