Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
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
Attachments
Issue Links
- relates to
-
BOOKKEEPER-470 Possible infinite loop in simple.SubscribeReconnectCallback
- Closed
-
BOOKKEEPER-476 Log to file during tests
- Closed