ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30879] New: - OutOfMemoryException at JUnitTestRunner.java:342
Date Thu, 26 Aug 2004 22:24:35 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30879>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30879

OutOfMemoryException at JUnitTestRunner.java:342

           Summary: OutOfMemoryException at JUnitTestRunner.java:342
           Product: Ant
           Version: 1.6.2
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: skjones@avaya.com


I'm debugging a junit stress test, and set my logging Level to FINE. My test
starts outputting a TON to the console. The test is running from a forked JVM
using the junit tag's fork attribute="yes" and showoutput="yes".

Using hprof, I tracked it down to JUnitTestRunner's code which stores up all of
the task's stdErr and stdOut in a BYTE ARRAY, and then starts copying it all
over the place using a TeeOutputStream and ResultFormatters. Please update this
class so that it does not hold the task's entire output in memory.

As of today, this problem is present on the HEAD.

HPROF REPORT
SITES BEGIN (ordered by live bytes) Thu Aug 26 15:01:48 2004
          percent         live       alloc'ed  stack class
 rank   self  accum    bytes objs   bytes objs trace name
    1 52.49% 52.49% 32505872    1 65011752   18  1963 [B
    2 41.58% 94.07% 25745080    1 25745096    2 13668 [B

TRACE 1963:
java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:95)
java.io.PrintStream.write(PrintStream.java:258)
org.apache.tools.ant.util.TeeOutputStream.write(TeeOutputStream.java:91)
java.io.PrintStream.write(PrintStream.java:258)

TRACE 13668:
java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:136)
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:342)
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:560)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message