Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-45750

GitBlamer causes OutOfMemoryError

XMLWordPrintable

    • 5.0.0-beta3

      After updating to the Task Scanner Plugin 4.52 and Warnings Plugin 4.63 I get an OutOfMemory Error when GitBlamer is used to create author and commit information. This change was introduced by JENKINS-6748.

      The repository is large but by no means too large:

       

      $ du -hs .
      668M .
      $ git count-objects --human-readable
      247 objects, 169.25 KiB
      $ git rev-list --all --count
      25881
      

      This is an example error thrown by the Task Scanner Plugin:

      [TASKS] Scanning folder '/my/workspace' for files matching the pattern '**/*.java' - excludes: 
      [TASKS] Found 4657 files to scan for tasks
      [TASKS] Found 1058 open tasks.
      <Git Blamer> Using GitBlamer to create author and commit information for all warnings.
      <Git Blamer> GIT_COMMIT=1a23b8068bf1226fd62085036db6bb30a0edea55, workspace=/my/workspace
       > git rev-parse 1a23b8068bf1226fd62085036db6bb30a0edea55^{commit} # timeout=10
      FATAL: Java heap space
      java.lang.OutOfMemoryError: Java heap space
       at org.eclipse.jgit.internal.storage.file.PackFile.read(PackFile.java:693)
       at org.eclipse.jgit.internal.storage.file.WindowCache.load(WindowCache.java:289)
       at org.eclipse.jgit.internal.storage.file.WindowCache.getOrLoad(WindowCache.java:368)
       at org.eclipse.jgit.internal.storage.file.WindowCache.get(WindowCache.java:179)
       at org.eclipse.jgit.internal.storage.file.WindowCursor.pin(WindowCursor.java:336)
       at org.eclipse.jgit.internal.storage.file.WindowCursor.copy(WindowCursor.java:237)
       at org.eclipse.jgit.internal.storage.file.PackFile.readFully(PackFile.java:592)
       at org.eclipse.jgit.internal.storage.file.PackFile.load(PackFile.java:767)
       at org.eclipse.jgit.internal.storage.file.PackFile.get(PackFile.java:273)
       at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openPackedObject(ObjectDirectory.java:421)
       at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openPackedFromSelfOrAlternate(ObjectDirectory.java:390)
       at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openObject(ObjectDirectory.java:382)
       at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:154)
       at org.eclipse.jgit.treewalk.CanonicalTreeParser.reset(CanonicalTreeParser.java:214)
       at org.eclipse.jgit.treewalk.CanonicalTreeParser.createSubtreeIterator0(CanonicalTreeParser.java:248)
       at org.eclipse.jgit.treewalk.CanonicalTreeParser.createSubtreeIterator(CanonicalTreeParser.java:226)
       at org.eclipse.jgit.treewalk.CanonicalTreeParser.createSubtreeIterator(CanonicalTreeParser.java:70)
       at org.eclipse.jgit.treewalk.TreeWalk.enterSubtree(TreeWalk.java:1210)
       at org.eclipse.jgit.treewalk.TreeWalk.next(TreeWalk.java:828)
       at org.eclipse.jgit.blame.BlameGenerator.find(BlameGenerator.java:955)
       at org.eclipse.jgit.blame.BlameGenerator.processOne(BlameGenerator.java:603)
       at org.eclipse.jgit.blame.BlameGenerator.next(BlameGenerator.java:496)
       at org.eclipse.jgit.blame.BlameResult.computeAll(BlameResult.java:239)
       at org.eclipse.jgit.blame.BlameGenerator.computeBlameResult(BlameGenerator.java:450)
       at org.eclipse.jgit.api.BlameCommand.call(BlameCommand.java:230)
       at hudson.plugins.analysis.util.GitBlamer$BlameCallback.invoke(GitBlamer.java:130)
       at hudson.plugins.analysis.util.GitBlamer$BlameCallback.invoke(GitBlamer.java:104)
       at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.withRepository(AbstractGitAPIImpl.java:29)
       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.withRepository(CliGitAPIImpl.java:71)
       at hudson.plugins.analysis.util.GitBlamer.loadBlameResultsForFiles(GitBlamer.java:61)
       at hudson.plugins.analysis.util.GitBlamer.blame(GitBlamer.java:54)
       at hudson.plugins.analysis.util.AbstractBlamer$1.invoke(AbstractBlamer.java:62)

            drulli Ulli Hafner
            pmr Philipp Moeller
            Votes:
            5 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: