You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2008/08/04 16:54:36 UTC
DO NOT REPLY [Bug 45536] New: JUnit PlainJUnitResultFormatter goes
OOM at the end of a run
https://issues.apache.org/bugzilla/show_bug.cgi?id=45536
Summary: JUnit PlainJUnitResultFormatter goes OOM at the end of a
run
Product: Ant
Version: 1.8Alpha (nightly)
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Optional Tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: stevel@apache.org
This is happening running Hadoop unit tests, presumably because the buffer is
30MB of unicode text
[junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 7.987 sec
[junit] Exception in thread "Main Thread" java.lang.OutOfMemoryError:
allocLargeObjectOrArray - Object size: 30177672, Num elements: 30177650
[junit] at java.util.Arrays.copyOf(Arrays.java:2786)
[junit] at java.lang.StringCoding.safeTrim(StringCoding.java:64)
[junit] at java.lang.StringCoding.access$300(StringCoding.java:34)
[junit] at
java.lang.StringCoding$StringEncoder.encode(StringCoding.java:251)
[junit] at java.lang.StringCoding.encode(StringCoding.java:272)
[junit] at
java.lang.LangAccessImpl.stringCodingDefaultEncode(LangAccessImpl.java:39)
[junit] at java.lang.String.getBytes(String.java:987)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter.endTestSuite(PlainJUnitResultFormatter.java:152)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.fireEndTestSuite(JUnitTestRunner.java:619)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:452)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768)
[junit] Running org.apache.hadoop.mapred.TestKeyValueTextInputFormat
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
[junit] Test org.apache.hadoop.mapred.TestKeyValueTextInputFormat FAILED
(crashed)
Seems to me we could write this data straight out to the file, instead of
routing via a StringBuffer.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 45536] JUnit PlainJUnitResultFormatter goes OOM at
the end of a run
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45536
Antoine Levy-Lambert <an...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|1.8.0 |1.8.1
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 45536] JUnit PlainJUnitResultFormatter goes OOM at
the end of a run
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45536
--- Comment #1 from Steve Loughran <st...@apache.org> 2010-03-01 17:00:34 UTC ---
Created an attachment (id=25075)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25075)
patch for the JUnitTestRunner and PlainJUnitResultFormatter
Patch handles OOM gracefully in the test runner by intercepting that part of
the process and replacing it with a string warning of memory problems.
At the output formatter avoids building everything up into one large string to
output, instead every stream is put out separately and the buffers flushed,
this makes it much more robust.
No tests, not unless you want to create 40MB worth of log4j output.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 45536] JUnit PlainJUnitResultFormatter goes OOM at
the end of a run
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45536
Antoine Levy-Lambert <an...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|1.8.0RC1 |1.8.0
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 45536] JUnit PlainJUnitResultFormatter goes OOM at
the end of a run
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45536
Antoine Levy-Lambert <an...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|1.8Alpha (nightly) |1.8.0RC1
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 45536] JUnit PlainJUnitResultFormatter goes OOM at the end of a
run
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45536
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |1.9.4
--- Comment #2 from Stefan Bodewig <bo...@apache.org> ---
svn revision 1556001
--
You are receiving this mail because:
You are the assignee for the bug.
DO NOT REPLY [Bug 45536] JUnit PlainJUnitResultFormatter goes OOM at
the end of a run
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45536
Antoine Levy-Lambert <an...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|1.8.1 |1.8.2
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.