You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Ivan Kelly (JIRA)" <ji...@apache.org> on 2012/12/07 12:55:21 UTC

[jira] [Resolved] (BOOKKEEPER-489) OOM running hedwig tests

     [ https://issues.apache.org/jira/browse/BOOKKEEPER-489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Kelly resolved BOOKKEEPER-489.
-----------------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: 4.2.0)

Problem was caused by infinite loop, which was fixed by BOOKKEEPER-470
                
> OOM running hedwig tests
> ------------------------
>
>                 Key: BOOKKEEPER-489
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-489
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: hedwig-server
>            Reporter: Sijie Guo
>            Assignee: Sijie Guo
>         Attachments: BOOKKEEPER-489.diff
>
>
> Got following exception when running hedwig tests:
> {code}
> 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)
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira