jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven Surefire
  • Maven Surefire
  • SUREFIRE-495

OutOfMemory Exception

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 2.4.2
  • Fix Version/s: 2.7
  • Component/s: Maven Surefire Plugin
  • Labels:
    None
  • Environment:
    VMWare with Suse Linux 32bit,
    Surfire Plugin with Maven2 and TestNG
  • Complexity:
    Intermediate
  • Number of attachments :
    2

Description

Hello,

when we run testNG Tests in Parallel Mode, we become a OutOfMemory Exception from the jvm.

Surfire safe the log information as a lot of byte-Arrays, and dosn't destroy this, so we run into a memmoryleak.

in a example stackdump we bekomme ~1500 'org.apache.maven.surefire.util.TeeStream' objects whitch have ~500MB retained size.
We have found the Problem in the log handling from surfire, when surfire sends the output into StreamArrays.

surfire plugin-call in pom.xml:

...
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>once</forkMode>
<systemProperties>
<catalina.base>.</catalina.base>
</systemProperties>
<testFailureIgnore>
$

{sdit.testFailureIgnore}

</testFailureIgnore>
<suiteXmlFiles>
<suiteXmlFile>$

{sdit.testSuite}

</suiteXmlFile>
</suiteXmlFiles>
<argLine>-Xmx1000M</argLine>
</configuration>
<version>2.4.2</version>
</plugin>
...

In Attachment I give you the jesult from JConsole (with surfire and without surfire) ans Eclipse Memory Analyzer

------------------------------------------------------------------------------------
The bugreport in german:

Wir haben das Problem, dass der Speicherverbrauch der JVM wenn wir testng tests mit dem surfire-plugin aus maven2 aufrufen nahezu linear ansteigt. Wir machen Performencemessungen bei denen wir testng tests mit unterschiedlicher anzahl threads ausführen lassen.

Nach längerer Suche konnten wir das Problem in org.apache.maven.surefire.util.TeeStream entdecken. Die logausgeben welche normalerweise auf die Konsole ausgegeben werden werden vom surfireplugin in byteArrays geschrieben, welche nicht mehr freigegeben werden.
In unserem Beispiel hatten wir ~1500 TeeStream Objekte welche ~500MB Speicher nutzen.
Scheinbar ist surfire nicht 100% Threadsafe und hat an diese Stelle ein Speicherleak.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    bugreport.zip
    08/May/08 7:27 AM
    413 kB
    Andre
    1. PNG File
      bugreport/EclipseMemoryAnalyzer1.png 186 kB
    2. PNG File
      bugreport/EclipseMemoryAnalyzer2.png 135 kB
    3. PNG File
      bugreport/EclipseMemoryAnalyzer3.png 112 kB
    4. PNG File
      bugreport/Space without surfire.png 16 kB
    5. PNG File
      bugreport/space with surfire.png 10 kB
    Download Zip
    Show
    Zip Archive
    bugreport.zip
    08/May/08 7:27 AM
    413 kB
    Andre
  1. space wtih surfireplugin.jpg
    44 kB
    13/May/08 3:25 AM

Issue Links

is depended upon by

Bug - A problem which impairs or prevents the functions of the product. SUREFIRE-711 OutOfMemoryError while building multi module projects

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
is duplicated by

Bug - A problem which impairs or prevents the functions of the product. SUREFIRE-581 ReporterManager causes OutOfMemoryException

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Bug - A problem which impairs or prevents the functions of the product. SUREFIRE-647 Memory Leak

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
relates to

Bug - A problem which impairs or prevents the functions of the product. SUREFIRE-599 Logs console output multiple times (no. of times log output = the no. of test being run) for JUnit/XMLUnit tests

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Kristian Rosenvold added a comment - 13/Dec/10 3:32 PM

Fixed in r1045382

Show
Kristian Rosenvold added a comment - 13/Dec/10 3:32 PM Fixed in r1045382
Hide
Permalink
Jeff Jensen added a comment - 13/Dec/10 3:52 PM

Wonderful! Can't wait for 2.7... Thank you!

Show
Jeff Jensen added a comment - 13/Dec/10 3:52 PM Wonderful! Can't wait for 2.7... Thank you!

People

  • Assignee:
    Kristian Rosenvold
    Reporter:
    Andre
Vote (3)
Watch (5)

Dates

  • Created:
    08/May/08 7:27 AM
    Updated:
    03/Mar/11 6:45 AM
    Resolved:
    13/Dec/10 3:32 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.