jira-importer commented on issue #166:
URL: 
https://github.com/apache/maven-source-plugin/issues/166#issuecomment-2959545712

   **[Stephan 
Schroevers](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=stephan202)**
 commented
   
   I've traced part of the issue to 
[plexus-archiver@f6dd097](https://github.com/codehaus-plexus/plexus-archiver/commit/f6dd0976c070440eca0d060cb8baf2b99567b615)
 (MASSEMBLY-768, replacing `ParallelScatterZipCreator` with 
`ConcurrentJarCreator`). The attached [^compare-plexus-archiver-revisions.sh] 
compares that revision with the one just before it, and without that change the 
OOM does not happen. Script output:
   
   ```
   Building commons-compress:1.10-SNAPSHOT...
   Building plexus-archiver:2.10.1-SNAPSHOT @ 
f6dd0976c070440eca0d060cb8baf2b99567b615...
   Building maven-source-plugin:3.0.1-SNAPSHOT with 
plexus-archiver:2.10.1-SNAPSHOT...
   <snip; the versions-maven-plugin is very verbose>
   Checking out jetty.project:jetty-9.3.9.M1 for testing...
   Running first test...
   Testing 
org.apache.maven.plugins:maven-source-plugin:3.0.1-SNAPSHOT:jar-no-fork with 
128m:
   Total time: 3.532 s
   Final Memory: 74M/114M
   java.lang.OutOfMemoryError: Java heap space
   Testing 
org.apache.maven.plugins:maven-source-plugin:3.0.1-SNAPSHOT:jar-no-fork with 
256m:
   Total time: 11.871 s
   Final Memory: 38M/236M
   Testing 
org.apache.maven.plugins:maven-source-plugin:3.0.1-SNAPSHOT:jar-no-fork with 
512m:
   Total time: 7.088 s
   Final Memory: 38M/453M
   Testing 
org.apache.maven.plugins:maven-source-plugin:3.0.1-SNAPSHOT:jar-no-fork with 
1024m:
   Total time: 4.175 s
   Final Memory: 38M/667M
   Testing 
org.apache.maven.plugins:maven-source-plugin:3.0.1-SNAPSHOT:jar-no-fork with 
2048m:
   Total time: 3.623 s
   Final Memory: 39M/847M
   Testing 
org.apache.maven.plugins:maven-source-plugin:3.0.1-SNAPSHOT:jar-no-fork with 
4096m:
   Total time: 3.914 s
   Final Memory: 42M/1450M
   Building plexus-archiver:2.10.1-SNAPSHOT @ 
bb30b107c78deebf5c3d3227fb8614c03f9275d0...
   Running second test...
   Testing 
org.apache.maven.plugins:maven-source-plugin:3.0.1-SNAPSHOT:jar-no-fork with 
128m:
   Total time: 3.223 s
   Final Memory: 38M/112M
   Testing 
org.apache.maven.plugins:maven-source-plugin:3.0.1-SNAPSHOT:jar-no-fork with 
256m:
   Total time: 2.965 s
   Final Memory: 41M/224M
   Testing 
org.apache.maven.plugins:maven-source-plugin:3.0.1-SNAPSHOT:jar-no-fork with 
512m:
   Total time: 2.685 s
   Final Memory: 41M/291M
   Testing 
org.apache.maven.plugins:maven-source-plugin:3.0.1-SNAPSHOT:jar-no-fork with 
1024m:
   Total time: 2.697 s
   Final Memory: 44M/461M
   Testing 
org.apache.maven.plugins:maven-source-plugin:3.0.1-SNAPSHOT:jar-no-fork with 
2048m:
   Total time: 2.987 s
   Final Memory: 40M/708M
   Testing 
org.apache.maven.plugins:maven-source-plugin:3.0.1-SNAPSHOT:jar-no-fork with 
4096m:
   Total time: 3.174 s
   Final Memory: 45M/1220M
   ```
   
   Note that even before `f6dd097` the run time and memory usage is not on par 
with 2.4, so there is some additional cause.
   
   I will not look into this further, for now at least, because I need to spend 
some time on other things.
   
   NB: I also tested with the latest revision of `plexus-archiver`, and that 
didn't fix the problem. So [plexus-archiver PR 
#25](https://github.com/codehaus-plexus/plexus-archiver/pull/25) ("_Fix 
potential resource leak in ConcurrentJarCreator_") doesn't seem related.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to