rtyley / bfg-repo-cleaner

Removes large or troublesome blobs like git-filter-branch does, but faster. And written in Scala
https://rtyley.github.io/bfg-repo-cleaner/
GNU General Public License v3.0
11.1k stars 549 forks source link

BFG 1.12.13 Garbage Collection failed #173

Open andypl78 opened 8 years ago

andypl78 commented 8 years ago

The first time running a second time does not work anymore

free
             total       used       free     shared    buffers     cached
Mem:      16473788    3343816   13129972      52776     143560    1816640
-/+ buffers/cache:    1383616   15090172
Swap:      3905532          0    3905532

sync; echo 3 > /proc/sys/vm/drop_caches

free
             total       used       free     shared    buffers     cached
Mem:      16473788    1173936   15299852      52776       3064      89964
-/+ buffers/cache:    1080908   15392880
Swap:      3905532          0    3905532
java -jar ~/git/bfg-1.12.13.jar --delete-files *.pdf --no-blob-protection

Using repo : /data/svn2git/test/.git

This repo has been processed by The BFG before! Will prune repo before proceeding - to avoid unnecessary cleaning work on unused objects...
Exception in thread "main" org.eclipse.jgit.api.errors.JGitInternalException: Garbage collection failed.
        at org.eclipse.jgit.api.GarbageCollectCommand.call(GarbageCollectCommand.java:192)
        at com.madgag.git.bfg.cli.Main$$anonfun$1.apply(Main.scala:49)
        at com.madgag.git.bfg.cli.Main$$anonfun$1.apply(Main.scala:34)
        at scala.Option.map(Option.scala:146)
        at com.madgag.git.bfg.cli.Main$.delayedEndpoint$com$madgag$git$bfg$cli$Main$1(Main.scala:33)
        at com.madgag.git.bfg.cli.Main$delayedInit$body.apply(Main.scala:27)
        at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
        at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
        at scala.App$$anonfun$main$1.apply(App.scala:76)
        at scala.App$$anonfun$main$1.apply(App.scala:76)
        at scala.collection.immutable.List.foreach(List.scala:381)
        at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
        at scala.App$class.main(App.scala:76)
        at com.madgag.git.bfg.cli.Main$.main(Main.scala:27)
        at com.madgag.git.bfg.cli.Main.main(Main.scala)
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown 56fa6fe2768134c59c776f8d57a7209cf3ff2c8c
        at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:158)
        at org.eclipse.jgit.lib.ObjectReader$1.open(ObjectReader.java:300)
        at org.eclipse.jgit.revwalk.RevWalk$2.next(RevWalk.java:971)
        at org.eclipse.jgit.internal.storage.pack.PackWriter.findObjectsToPack(PackWriter.java:1660)
        at org.eclipse.jgit.internal.storage.pack.PackWriter.preparePack(PackWriter.java:756)
        at org.eclipse.jgit.internal.storage.pack.PackWriter.preparePack(PackWriter.java:717)
        at org.eclipse.jgit.internal.storage.file.GC.writePack(GC.java:769)
        at org.eclipse.jgit.internal.storage.file.GC.repack(GC.java:603)
        at org.eclipse.jgit.internal.storage.file.GC.gc(GC.java:176)
        at org.eclipse.jgit.api.GarbageCollectCommand.call(Garbage
```CollectCommand.java:175)
javabrett commented 8 years ago

Can you run a combination of grep an git commands to try and establish what if anything might be pointing to commit 56fa6fe2768134c59c776f8d57a7209cf3ff2c8c (assuming it is a commit)?