-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git-repack fails to delete an object directory it holds open #231
Comments
Just in case, I have no antivirus software running on this box and have verified no other process has a handle open for those directories. |
I just verified that there is no call to
to figure out where the handle is opened. Then either the code itself, or starting it in BTW I could imagine that the directory handle is actually opened implicitly by |
@kostix IIRC there was a fix for this bug in 2.4.6. Could you verify, or reject, my claim that this bug is fixed? |
@dscho just tested with 2.4.6-RC5 32-bit on a live repo, and no, it fails in the same way. If you will be able to do something about this, I could prepare an "unpacked" live repository for you on the test box (I remember one can do certain tricks with |
@kostix I was wrong, the patch has not been applied yet. I talk about http://article.gmane.org/gmane.comp.version-control.msysgit/21791. Could you (re-)build Git for Windows by applying this patch? (I typically use msysGit's https://github.com/msysgit/msysgit/blob/master/bin/apply-from-gmane.sh to apply such patches by running |
@kostix to make it easier to test, I just pushed to the cd /usr/src/git
git fetch origin
git checkout -t origin/issue-231
make -j15 install
cd /your/repository
git gc --aggressive |
That would also work, just let me know whether it is easier for you to set that up, or whether it is easier to test Git built from |
As I am going through these issues to prepare for the release, I will just assume that this works as expected and merge it. (@kostix feel free to test nevertheless 😃) |
This branch hopefully addresses #231 where `git repack` could not delete the object directory because there was still an open handle on it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho, I'm actually willing to look at it, but I just have not enough time budget for it :-( |
@kostix I understand, of course. I would still feel much better about this ticket if you could verify that the bug is fixed, when you have time. |
@kostix just a gentle nudge... Did you find time to test it with 2.5.0 yet? |
This branch hopefully addresses git-for-windows#231 where `git repack` could not delete the object directory because there was still an open handle on it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@kostix Did you find time to test it with 2.5.1 yet? |
This branch hopefully addresses #231 where `git repack` could not delete the object directory because there was still an open handle on it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@kostix could you please test with 2.5.2? |
@dscho, 2.5.2 release 2 works for me just OK on 32-bit Windows XP SP3. I've run Thanks! |
Awesome! (And yes, you beat me: I would have asked you to test with 2.5.2(2) today 😜) |
This branch hopefully addresses git-for-windows#231 where `git repack` could not delete the object directory because there was still an open handle on it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This branch hopefully addresses git-for-windows#231 where `git repack` could not delete the object directory because there was still an open handle on it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This branch hopefully addresses #231 where `git repack` could not delete the object directory because there was still an open handle on it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This branch hopefully addresses git-for-windows#231 where `git repack` could not delete the object directory because there was still an open handle on it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This branch hopefully addresses git-for-windows#231 where `git repack` could not delete the object directory because there was still an open handle on it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This branch hopefully addresses #231 where `git repack` could not delete the object directory because there was still an open handle on it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
…ing temp files When we create temp files for downloading packs, we use a name based on the current timestamp. There is no randomness in the name, so we can have collisions in the same second. Retry the temp pack names using a new "-<retry>" suffix to the name before the ".temp". This is a follow-up to git-for-windows#229.
…ing temp files When we create temp files for downloading packs, we use a name based on the current timestamp. There is no randomness in the name, so we can have collisions in the same second. Retry the temp pack names using a new "-<retry>" suffix to the name before the ".temp". This is a follow-up to git-for-windows#229.
…ing temp files When we create temp files for downloading packs, we use a name based on the current timestamp. There is no randomness in the name, so we can have collisions in the same second. Retry the temp pack names using a new "-<retry>" suffix to the name before the ".temp". This is a follow-up to git-for-windows#229.
Includes these pull requests: git-for-windows#227 git-for-windows#228 git-for-windows#229 git-for-windows#231 git-for-windows#240 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Includes these pull requests: git-for-windows#227 git-for-windows#228 git-for-windows#229 git-for-windows#231 git-for-windows#240 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Includes these pull requests: git-for-windows#227 git-for-windows#228 git-for-windows#229 git-for-windows#231 git-for-windows#240 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Includes these pull requests: git-for-windows#227 git-for-windows#228 git-for-windows#229 git-for-windows#231 git-for-windows#240 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Includes these pull requests: git-for-windows#227 git-for-windows#228 git-for-windows#229 git-for-windows#231 git-for-windows#240 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Includes these pull requests: git-for-windows#227 git-for-windows#228 git-for-windows#229 git-for-windows#231 git-for-windows#240 Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
If I do
git gc --aggressive
(with the recent RC4 on Windows XP SP3 32-bit), at a certain stagegit repack
tries to delete empty ".git/objects/NN" directories (after it supposedly moves the objects from them into a pack file), and fails.The situation look slike this:
This happens for every other directory it tries to delete (if I answer "n" to the prompt).
The directories attempted to be deleted are truly empty -- I have verified that.
The details extracted using Process Explorer about the running
git repack
process are:C:\Program Files\Git\mingw32\libexec\git-core\git.exe
git repack -d -l -f --depth=250 --window=250 -A --unpack-unreachable=2.weeks.ago
If I use
procexp
to search through the handles currently open for items under ".git",procexp
reveals that the handle to that repository is held by the samegit repack
process which is trying to delete it (it also has the second handle open -- to the packfile it's supposedly were placing the objects into).The text was updated successfully, but these errors were encountered: