java.lang.OutOfMemoryError: Java heap space

Jenkins JIRA | Russell Gallop | 4 years ago
  1. 0

    I am building a large project with a lot of clang errors and get the following output: Publishing Clang scan-build results FATAL: Java heap space java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOfRange(Arrays.java:3209) at java.lang.String.<init>(String.java:215) at java.lang.StringBuffer.toString(StringBuffer.java:585) at java.io.StringWriter.toString(StringWriter.java:193) at org.apache.commons.io.IOUtils.toString(IOUtils.java:360) at hudson.FilePath.readToString(FilePath.java:1430) at jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher.createBugInstance(ClangScanBuildPublisher.java:193) at jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher.createBugFromClangScanBuildHtml(ClangScanBuildPublisher.java:128) at jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher.perform(ClangScanBuildPublisher.java:104) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:710) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:685) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:632) at hudson.model.Run.run(Run.java:1459) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:239) I have 3404 clang error files, totalling about 2.4 GB. The largest is 4.7 MB. It looks from the source code like it is loading the html files into a string one by one when it does this. I have specified 4 GB of stack space and think that this should be enough! 4 GB of heap is enough for a subset of my project producing 1691 clang html files, totalling 1.2 GB. The largest of these is also 4.7 MB so I don't think that is the issue.

    Jenkins JIRA | 4 years ago | Russell Gallop
    java.lang.OutOfMemoryError: Java heap space
  2. 0

    I am building a large project with a lot of clang errors and get the following output: Publishing Clang scan-build results FATAL: Java heap space java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOfRange(Arrays.java:3209) at java.lang.String.<init>(String.java:215) at java.lang.StringBuffer.toString(StringBuffer.java:585) at java.io.StringWriter.toString(StringWriter.java:193) at org.apache.commons.io.IOUtils.toString(IOUtils.java:360) at hudson.FilePath.readToString(FilePath.java:1430) at jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher.createBugInstance(ClangScanBuildPublisher.java:193) at jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher.createBugFromClangScanBuildHtml(ClangScanBuildPublisher.java:128) at jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher.perform(ClangScanBuildPublisher.java:104) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:710) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:685) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:632) at hudson.model.Run.run(Run.java:1459) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:239) I have 3404 clang error files, totalling about 2.4 GB. The largest is 4.7 MB. It looks from the source code like it is loading the html files into a string one by one when it does this. I have specified 4 GB of stack space and think that this should be enough! 4 GB of heap is enough for a subset of my project producing 1691 clang html files, totalling 1.2 GB. The largest of these is also 4.7 MB so I don't think that is the issue.

    Jenkins JIRA | 4 years ago | Russell Gallop
    java.lang.OutOfMemoryError: Java heap space
  3. 0

    Java out of memory errors on large WSDLs (play framework)

    Stack Overflow | 5 years ago | Conor Gallagher
    java.lang.OutOfMemoryError: Java heap space
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 412#165616730

    GitHub | 12 months ago | wagnerdracha
    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 java.util.Arrays.copyOfRange()
    2. Java RT
      StringWriter.toString
      1. java.util.Arrays.copyOfRange(Arrays.java:3209)
      2. java.lang.String.<init>(String.java:215)
      3. java.lang.StringBuffer.toString(StringBuffer.java:585)
      4. java.io.StringWriter.toString(StringWriter.java:193)
      4 frames
    3. Commons IO
      IOUtils.toString
      1. org.apache.commons.io.IOUtils.toString(IOUtils.java:360)
      1 frame
    4. Hudson
      FilePath.readToString
      1. hudson.FilePath.readToString(FilePath.java:1430)
      1 frame
    5. jenkins.plugins.clangscanbuild
      ClangScanBuildPublisher.perform
      1. jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher.createBugInstance(ClangScanBuildPublisher.java:193)
      2. jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher.createBugFromClangScanBuildHtml(ClangScanBuildPublisher.java:128)
      3. jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher.perform(ClangScanBuildPublisher.java:104)
      3 frames
    6. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      2. hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:710)
      3. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:685)
      4. hudson.model.Build$RunnerImpl.post2(Build.java:162)
      5. hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:632)
      6. hudson.model.Run.run(Run.java:1459)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      8. hudson.model.ResourceController.execute(ResourceController.java:88)
      9. hudson.model.Executor.run(Executor.java:239)
      9 frames