Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
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 :
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>
$
</testFailureIgnore>
<suiteXmlFiles>
<suiteXmlFile>$
</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.
Issue Links
- is depended upon by
-
SUREFIRE-711
OutOfMemoryError while building multi module projects
-
- is duplicated by
-
SUREFIRE-581
ReporterManager causes OutOfMemoryException
-
-
SUREFIRE-647
Memory Leak
-
- relates to
-
SUREFIRE-599
Logs console output multiple times (no. of times log output = the no. of test being run) for JUnit/XMLUnit tests
-
Activity
| Field | Original Value | New Value |
|---|---|---|
| Attachment | space wtih surfireplugin.jpg [ 34491 ] |
| Fix Version/s | 2.x [ 13647 ] |
| Link |
This issue is duplicated by |
| Link |
This issue is duplicated by |
| Status | Open [ 1 ] | Closed [ 6 ] |
| Assignee | Kristian Rosenvold [ krosenvold ] | |
| Fix Version/s | 2.7 [ 16691 ] | |
| Fix Version/s | Backlog [ 13647 ] | |
| Resolution | Fixed [ 1 ] |
| Link |
This issue relates to |
| Link |
This issue is depended upon by |
Fixed in r1045382