java.lang.OutOfMemoryError: Java heap space

Jenkins JIRA | Itai Sanders | 6 months ago
  1. 0

    we are migrating our jobs to the multibranch pipelines, about a dozen or more. all of them work fine, but one repository wouldn't pass the branch indexing process. the process gets stuck and eventually fails with the following log message: {noformat} Setting origin to https://git..... Fetching origin... Finished: NOT_BUILT {noformat} after double and triple checking all our configurations and repositories, we couldn't find any difference between this repository and the others. I went through the Jenkins Log and found out that whenever this particular branch indexing fails the log prints out a java heap out of memory error. it doesn't show the full message on every such error, so I can only assume the first one of those is the relevant full stack trace: {noformat} Jun 08, 2016 11:31:22 AM SEVERE hudson.model.Executor finish1 Executor threw an exception java.lang.OutOfMemoryError: Java heap space at org.eclipse.jgit.internal.storage.pack.BinaryDelta.apply(BinaryDelta.java:163) at org.eclipse.jgit.internal.storage.pack.BinaryDelta.apply(BinaryDelta.java:118) at org.eclipse.jgit.transport.PackParser.resolveDeltas(PackParser.java:610) at org.eclipse.jgit.transport.PackParser.resolveDeltas(PackParser.java:587) at org.eclipse.jgit.transport.PackParser.resolveDeltas(PackParser.java:550) at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:507) at org.eclipse.jgit.internal.storage.file.ObjectDirectoryPackParser.parse(ObjectDirectoryPackParser.java:194) at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:448) at org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(BasePackFetchConnection.java:762) at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:363) at org.eclipse.jgit.transport.TransportHttp$SmartHttpFetchConnection.doFetch(TransportHttp.java:783) at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:301) at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:291) at org.eclipse.jgit.transport.FetchProcess.fetchObjects(FetchProcess.java:247) at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:160) at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122) at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138) at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130) at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:678) at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:174) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:146) at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:294) at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:157) at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:122) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) {noformat} again - we have no idea what makes the difference. the repository itself isn't bigger than the others, we don't have special characters in our branch names (only alphanomerics . - _ and such. no spaces and no escaped chars) and all the repositories are hosted in Assembla. running this same job as a regular pipeline job works. it's only the branch indexing that causes this problem. so my guess is that the heap space should be sufficient, but something somehow throws the indexing process into an infinite recursion (or something of the kind).

    Jenkins JIRA | 6 months ago | Itai Sanders
    java.lang.OutOfMemoryError: Java heap space
  2. 0

    we are migrating our jobs to the multibranch pipelines, about a dozen or more. all of them work fine, but one repository wouldn't pass the branch indexing process. the process gets stuck and eventually fails with the following log message: {noformat} Setting origin to https://git..... Fetching origin... Finished: NOT_BUILT {noformat} after double and triple checking all our configurations and repositories, we couldn't find any difference between this repository and the others. I went through the Jenkins Log and found out that whenever this particular branch indexing fails the log prints out a java heap out of memory error. it doesn't show the full message on every such error, so I can only assume the first one of those is the relevant full stack trace: {noformat} Jun 08, 2016 11:31:22 AM SEVERE hudson.model.Executor finish1 Executor threw an exception java.lang.OutOfMemoryError: Java heap space at org.eclipse.jgit.internal.storage.pack.BinaryDelta.apply(BinaryDelta.java:163) at org.eclipse.jgit.internal.storage.pack.BinaryDelta.apply(BinaryDelta.java:118) at org.eclipse.jgit.transport.PackParser.resolveDeltas(PackParser.java:610) at org.eclipse.jgit.transport.PackParser.resolveDeltas(PackParser.java:587) at org.eclipse.jgit.transport.PackParser.resolveDeltas(PackParser.java:550) at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:507) at org.eclipse.jgit.internal.storage.file.ObjectDirectoryPackParser.parse(ObjectDirectoryPackParser.java:194) at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:448) at org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(BasePackFetchConnection.java:762) at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:363) at org.eclipse.jgit.transport.TransportHttp$SmartHttpFetchConnection.doFetch(TransportHttp.java:783) at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:301) at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:291) at org.eclipse.jgit.transport.FetchProcess.fetchObjects(FetchProcess.java:247) at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:160) at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122) at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138) at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130) at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:678) at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:174) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:146) at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:294) at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:157) at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:122) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) {noformat} again - we have no idea what makes the difference. the repository itself isn't bigger than the others, we don't have special characters in our branch names (only alphanomerics . - _ and such. no spaces and no escaped chars) and all the repositories are hosted in Assembla. running this same job as a regular pipeline job works. it's only the branch indexing that causes this problem. so my guess is that the heap space should be sufficient, but something somehow throws the indexing process into an infinite recursion (or something of the kind).

    Jenkins JIRA | 6 months ago | Itai Sanders
    java.lang.OutOfMemoryError: Java heap space
  3. 0

    OutOfMemory Exception : java heap space

    Google Groups | 6 months ago | deepak singh
    java.lang.OutOfMemoryError: Java heap space* *java.lang.OutOfMemoryError: Java heap space*
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    OutOfMemory Exception : java heap space

    Google Groups | 6 months ago | deepak singh
    java.lang.OutOfMemoryError: Java heap space* *java.lang.OutOfMemoryError: Java heap space*
  6. 0

    [exoplatform] [explatform] Memory requirements

    ow2.org | 1 year ago
    java.lang.OutOfMemoryError: Java heap space>java.lang.OutOfMemoryError: Java heap space

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.OutOfMemoryError

      Java heap space

      at org.eclipse.jgit.internal.storage.pack.BinaryDelta.apply()
    2. JGit - Core
      FetchCommand.call
      1. org.eclipse.jgit.internal.storage.pack.BinaryDelta.apply(BinaryDelta.java:163)
      2. org.eclipse.jgit.internal.storage.pack.BinaryDelta.apply(BinaryDelta.java:118)
      3. org.eclipse.jgit.transport.PackParser.resolveDeltas(PackParser.java:610)
      4. org.eclipse.jgit.transport.PackParser.resolveDeltas(PackParser.java:587)
      5. org.eclipse.jgit.transport.PackParser.resolveDeltas(PackParser.java:550)
      6. org.eclipse.jgit.transport.PackParser.parse(PackParser.java:507)
      7. org.eclipse.jgit.internal.storage.file.ObjectDirectoryPackParser.parse(ObjectDirectoryPackParser.java:194)
      8. org.eclipse.jgit.transport.PackParser.parse(PackParser.java:448)
      9. org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(BasePackFetchConnection.java:762)
      10. org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:363)
      11. org.eclipse.jgit.transport.TransportHttp$SmartHttpFetchConnection.doFetch(TransportHttp.java:783)
      12. org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:301)
      13. org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:291)
      14. org.eclipse.jgit.transport.FetchProcess.fetchObjects(FetchProcess.java:247)
      15. org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:160)
      16. org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
      17. org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)
      18. org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
      18 frames
    3. org.jenkinsci.plugins
      JGitAPIImpl.fetch
      1. org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:678)
      1 frame
    4. jenkins.plugins.git
      AbstractGitSCMSource.retrieve
      1. jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:174)
      1 frame
    5. jenkins.scm.api
      SCMSource.fetch
      1. jenkins.scm.api.SCMSource.fetch(SCMSource.java:146)
      1 frame
    6. jenkins.branch
      MultiBranchProject.computeChildren
      1. jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:294)
      1 frame
    7. com.cloudbees.hudson
      FolderComputation.run
      1. com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:157)
      2. com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:122)
      2 frames
    8. Hudson
      Executor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:98)
      2. hudson.model.Executor.run(Executor.java:410)
      2 frames