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

Warnings plugin gets OutOfMemoryException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: warnings-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: Linux
    • Similar Issues:

      Description

      My build completes successfully, but the warnings generation part fails with an
      OutOfMemoryError. I tried setting -Xmx in the Advanced options for Maven to a
      large value, but it didn't help. Does the plugin launch Java using those same
      parameters specified under Maven/Advanced, or does it launch Java with the
      default options?

      ...
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 96 minutes 49 seconds
      [INFO] Finished at: Fri Nov 21 10:29:47 PST 2008
      [INFO] Final Memory: 196M/760M
      [INFO] ------------------------------------------------------------------------
      channel stopped
      [WARNINGS] Parsing warnings in log file...
      FATAL: Java heap space
      java.lang.OutOfMemoryError: Java heap space
      at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:99)
      at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:518)
      at java.lang.StringBuffer.append(StringBuffer.java:307)
      at java.io.StringWriter.write(StringWriter.java:72)
      at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1129)
      at org.apache.commons.io.IOUtils.copy(IOUtils.java:1104)
      at org.apache.commons.io.IOUtils.copy(IOUtils.java:1050)
      at org.apache.commons.io.IOUtils.toString(IOUtils.java:359)
      at hudson.plugins.warnings.parser.RegexpParser.parse(RegexpParser.java:69)
      at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:66)
      at hudson.plugins.warnings.WarningsPublisher.perform(WarningsPublisher.java:110)
      at
      hudson.plugins.warnings.util.HealthAwarePublisher.perform(HealthAwarePublisher.java:172)
      at
      hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:318)
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:453)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:291)
      at hudson.model.Run.run(Run.java:813)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:205)
      at hudson.model.ResourceController.execute(ResourceController.java:70)
      at hudson.model.Executor.run(Executor.java:88)

        Attachments

          Activity

          Hide
          drulli Ulli Hafner added a comment -

          The warnings plug-in is startet on the master, i.e. it should use the memory
          parameters of Hudson (or your container). How big is your logfile?

          Show
          drulli Ulli Hafner added a comment - The warnings plug-in is startet on the master, i.e. it should use the memory parameters of Hudson (or your container). How big is your logfile?
          Hide
          drulli Ulli Hafner added a comment -

          The advanced options of maven will not work.

          Show
          drulli Ulli Hafner added a comment - The advanced options of maven will not work.
          Hide
          rvangent rvangent added a comment -

          The logfile is approximately 26MB.

          Show
          rvangent rvangent added a comment - The logfile is approximately 26MB.
          Hide
          drulli Ulli Hafner added a comment -

          I see, that is really big

          That requires a change in the architecture of the plug-in, which needs some
          time. Currently I'm reading the whole log into a string to support multi-line
          regular expressions. This works not in your case

          Show
          drulli Ulli Hafner added a comment - I see, that is really big That requires a change in the architecture of the plug-in, which needs some time. Currently I'm reading the whole log into a string to support multi-line regular expressions. This works not in your case
          Hide
          alu_enterprise alu_enterprise added a comment -

          Dear all,

          We are currently using this Hudson's plugin. And we have noticed the same problem.
          The log file size is nearly 200ko. But we tried with several log files with
          several sizes such as: 6ko, 1mo and 2mo.

          We tryed to enhance the memory with parameters like "-Xms256m -Xmx1024m" but the
          out of momory remains.

          The strange fact, is that the warning plugin says "[FILE Parser] Successfully
          parsed file" but no warning are found. Wich is strange because there are lot of
          Warning in the log file.

          Here is a copy of the error.
          [WARNINGS] Parsing warnings in log file...
          [FILE Parser] Successfully parsed file
          /viewdisks/v01/hudson_autobuild_snap_view/vobs/result/result.txt of module
          result with 0 warnings.
          FATAL: Java heap space
          java.lang.OutOfMemoryError: Java heap space
          at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:232)
          at java.lang.StringCoding.encode(StringCoding.java:272)
          at java.lang.String.getBytes(String.java:947)
          at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
          at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
          at java.io.File.isDirectory(File.java:754)
          at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1093)
          at
          org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136)
          at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095)
          at
          org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136)
          at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095)
          at
          org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136)
          at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095)
          at
          org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136)
          at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095)
          at
          org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136)
          at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095)
          at
          org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136)
          at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095)
          at
          org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136)
          at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095)
          at
          org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136)
          at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095)
          at
          org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136)
          at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095)
          at
          org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136)
          at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095)
          at
          org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136)
          at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095)
          at
          org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136)
          at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095)
          at
          org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136)

          We only wanted to add a remark on the log file size and confirm the error on
          each size.

          Show
          alu_enterprise alu_enterprise added a comment - Dear all, We are currently using this Hudson's plugin. And we have noticed the same problem. The log file size is nearly 200ko. But we tried with several log files with several sizes such as: 6ko, 1mo and 2mo. We tryed to enhance the memory with parameters like "-Xms256m -Xmx1024m" but the out of momory remains. The strange fact, is that the warning plugin says " [FILE Parser] Successfully parsed file" but no warning are found. Wich is strange because there are lot of Warning in the log file. Here is a copy of the error. [WARNINGS] Parsing warnings in log file... [FILE Parser] Successfully parsed file /viewdisks/v01/hudson_autobuild_snap_view/vobs/result/result.txt of module result with 0 warnings. FATAL: Java heap space java.lang.OutOfMemoryError: Java heap space at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:232) at java.lang.StringCoding.encode(StringCoding.java:272) at java.lang.String.getBytes(String.java:947) at java.io.UnixFileSystem.getBooleanAttributes0(Native Method) at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228) at java.io.File.isDirectory(File.java:754) at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1093) at org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136) at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095) at org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136) at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095) at org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136) at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095) at org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136) at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095) at org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136) at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095) at org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136) at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095) at org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136) at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095) at org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136) at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095) at org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136) at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095) at org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136) at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095) at org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136) at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095) at org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136) at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1095) at org.apache.tools.ant.DirectoryScanner.accountForIncludedDir(DirectoryScanner.java:1136) We only wanted to add a remark on the log file size and confirm the error on each size.
          Hide
          bbarlow bbarlow added a comment -

          After using Hudson and the warnings plugin successfully for several weeks, I too
          am now getting OutOfMemoryErrors during warnings parsing, even on log files as
          small as 2.5MB.
          BUILD SUCCESSFUL
          Total time: 10 seconds
          [WARNINGS] Parsing warnings in log file...
          FATAL: null
          java.lang.OutOfMemoryError
          at java.lang.String.<init>(String.java:295)
          at java.lang.StringBuffer.toString(StringBuffer.java:895)
          at java.io.StringWriter.toString(StringWriter.java:210)
          at org.apache.commons.io.IOUtils.toString(IOUtils.java:360)
          at hudson.plugins.warnings.parser.RegexpParser.parse(RegexpParser.java:69)
          at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:68)
          at hudson.plugins.warnings.WarningsPublisher.perform(WarningsPublisher.java:110)
          at
          hudson.plugins.warnings.util.HealthAwarePublisher.perform(HealthAwarePublisher.java:172)
          at
          hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:319)
          at
          hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:307)
          at hudson.model.Build$RunnerImpl.post2(Build.java:126)
          at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:292)
          at hudson.model.Run.run(Run.java:837)
          at hudson.model.Build.run(Build.java:88)
          at hudson.model.ResourceController.execute(ResourceController.java:70)
          at hudson.model.Executor.run(Executor.java:90)

          Show
          bbarlow bbarlow added a comment - After using Hudson and the warnings plugin successfully for several weeks, I too am now getting OutOfMemoryErrors during warnings parsing, even on log files as small as 2.5MB. BUILD SUCCESSFUL Total time: 10 seconds [WARNINGS] Parsing warnings in log file... FATAL: null java.lang.OutOfMemoryError at java.lang.String.<init>(String.java:295) at java.lang.StringBuffer.toString(StringBuffer.java:895) at java.io.StringWriter.toString(StringWriter.java:210) at org.apache.commons.io.IOUtils.toString(IOUtils.java:360) at hudson.plugins.warnings.parser.RegexpParser.parse(RegexpParser.java:69) at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:68) at hudson.plugins.warnings.WarningsPublisher.perform(WarningsPublisher.java:110) at hudson.plugins.warnings.util.HealthAwarePublisher.perform(HealthAwarePublisher.java:172) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:319) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:307) at hudson.model.Build$RunnerImpl.post2(Build.java:126) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:292) at hudson.model.Run.run(Run.java:837) at hudson.model.Build.run(Build.java:88) at hudson.model.ResourceController.execute(ResourceController.java:70) at hudson.model.Executor.run(Executor.java:90)
          Hide
          drulli Ulli Hafner added a comment -

          I added a parser configuration list box in the config screen. Please choose your
          parser and try again. There should be no problem anymore (unless you are using
          the eclipse parser).

          Show
          drulli Ulli Hafner added a comment - I added a parser configuration list box in the config screen. Please choose your parser and try again. There should be no problem anymore (unless you are using the eclipse parser).

            People

            Assignee:
            drulli Ulli Hafner
            Reporter:
            rvangent rvangent
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: