[ 
https://issues.apache.org/jira/browse/SUREFIRE-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17481357#comment-17481357
 ] 

Tibor Digana edited comment on SUREFIRE-1147 at 1/24/22, 7:58 PM:
------------------------------------------------------------------

[~NB4L1]
I am convinced that I fixed this bug in SUREFIRE-1845.
Please see the 
[changes|https://github.com/apache/maven-surefire/commit/32bd56b4ea908147592ef92c71c4e7936e070993]
 and run a test with the version *3.0.0-M6-SNAPSHOT*. The plugin can be found 
in the ASF repository 
https://repository.apache.org/content/repositories/snapshots/org/apache/maven/surefire/surefire/3.0.0-M6-SNAPSHOT/


was (Author: tibor17):
[~NB4L1]
I am convinced that I fixed this bug in SUREFIRE-1845.
Please see the 
[changes|https://github.com/apache/maven-surefire/commit/32bd56b4ea908147592ef92c71c4e7936e070993]
 and run a test with the version *3.0.0-M6-SNAPSHOT*. The plugin can be found 
in the ASF repository 
repository.apache.org/content/repositories/snapshots/org/apache/maven/surefire/surefire/3.0.0-M6-SNAPSHOT/

> Unbounded memory usage when running MANY tests
> ----------------------------------------------
>
>                 Key: SUREFIRE-1147
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1147
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.18.1
>         Environment: win7, jdk 8u25, mvn 3.2.5
>            Reporter: Laurent Claisse
>            Assignee: Tibor Digana
>            Priority: Major
>             Fix For: Backlog
>
>         Attachments: surefire-allocation-traces.png, surefire-leak.png, 
> surefire-leak2.png, surefire-leak3.png
>
>
> I'm writing concurrency tests, checking that this thing is reproducible, that 
> other thing isn't, and so on. So i repeat tests MANY times like 100_000 (to 
> reproduce the leak, the test project is here: 
> https://github.com/vandekeiser/parallel-stream-fork-join-pool)
> I see in VisualVM that the culprit is WrappedReportEntry, which indirectly 
> holds references to lots of byte[] and char[] (allocation traces and heap 
> dump pics are included in attachment)
> I forked and patched maven-surefire-common, and that makes the leak go. I had 
> to replace WrappedReportEntry.original by a singleton fake ReportEntry. 
> Bebefore that i had replaced 
> Utf8RecodingDeferredFileOutputStream.deferredFileOutputStream by a 
> NullOutputStream and the leak was lesser but still here.
> My fork of maven-surefire-common is there: 
> https://github.com/vandekeiser/maven-surefire/tree/master/maven-surefire-common.
> It IS a patch so i checked the patch checkbox in the issue reporter, but it 
> is NOT intended to be distributed of course since it is very brutal and basic.
> Also in my test project i explicitly deactivated reporting, but that doesn't 
> make the reporting leak go away at all:
> <disableXmlReport>true</disableXmlReport>
> <printSummary>false</printSummary>



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to