Uploaded image for project: 'Bookkeeper'
  1. Bookkeeper
  2. BOOKKEEPER-489

OOM running hedwig tests

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: hedwig-server
    • Labels:
      None

      Description

      Got following exception when running hedwig tests:

      Exception in thread "ThreadedStreamConsumer" java.lang.OutOfMemoryError: Java heap space
              at java.util.Arrays.copyOf(Arrays.java:2882)
              at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
              at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
              at java.lang.StringBuffer.append(StringBuffer.java:224)
              at org.apache.maven.surefire.report.ConsoleOutputFileReporter.writeMessage(ConsoleOutputFileReporter.java:115)
              at org.apache.maven.surefire.report.MulticastingReporter.writeMessage(MulticastingReporter.java:101)
              at org.apache.maven.surefire.report.TestSetRunListener.writeTestOutput(TestSetRunListener.java:99)
              at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:132)
              at org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67)
              at java.lang.Thread.run(Thread.java:680)
      Exception in thread "Thread-2" java.lang.OutOfMemoryError: Java heap space
              at java.util.Arrays.copyOf(Arrays.java:2882)
              at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
              at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:515)
              at java.lang.StringBuffer.append(StringBuffer.java:306)
              at java.io.BufferedReader.readLine(BufferedReader.java:345)
              at java.io.BufferedReader.readLine(BufferedReader.java:362)
              at org.codehaus.plexus.util.cli.StreamPumper.run(StreamPumper.java:129)
      

      It was caused due to Surefire buffering logs in memory. This issue is reported in http://jira.codehaus.org/browse/SUREFIRE-754 . It is supposed to be fixed in maven surefire plugin (version > 2.9). When I tried to bump the version of surefire plugin into 2.12.4 (maximum version available in maven repository), it still got the same exception. I am not sure what happened, but after I turn "INFO, CONSOLE" to "INFO, ROLLINGFILE", it works well. So I think the problem is even maven redirect std output to a file it still buffers some logs in memory, which cause the issue.

      So I would suggest change CONSOLE to ROLLINGFILE.

        Attachments

        1. BOOKKEEPER-489.diff
          1 kB
          Sijie Guo

          Issue Links

            Activity

              People

              • Assignee:
                hustlmsp Sijie Guo
                Reporter:
                hustlmsp Sijie Guo
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: