You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Arun Salimath (JIRA)" <ji...@apache.org> on 2016/03/15 22:42:33 UTC

[jira] [Comment Edited] (MSOURCES-94) Heap space OOM

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

Arun Salimath edited comment on MSOURCES-94 at 3/15/16 9:41 PM:
----------------------------------------------------------------

I have updated my brew and then mvn however I still use the same maven 3.1.1 version,  (On Mac)

A project that used to be built using maven 3.1.1 with java version 1.6  is not building, error is same as mentioned in this issue.  Note that I was able to build the same project before alright.  Now I am able to build it using   mvn 3.1.1 and Java 1.7 but not with my previous settings.   Also I checked with colleague of mine, on his machine he is able to build it fine  with 3.1.1 and java 1.6 (he did not make any brew update or maven).   Build uses same  maven-source-plugin version  3.0.0  on both mine and colleagues machine. but on mine it fails and on his it succeeds.


was (Author: aruns):
I have updated my brew and then mvn however I still use the same maven 3.1.1 version, 

A project that used to be built using maven 3.1.1 with java version 1.6  is not not building error is same as mentioned in this issue.  Note that I was able to build the same project before alright.  Now I am able to build it using   mvn 3.1.1 and Java 1.7 but not with my previous settings.   Also I checked with colleague of mine on his machine he is able to build it fine  with 3.1.1 and java 1.6 (he did not make any brew update or maven).   Build uses same  maven-source-plugin version  3.0.0  on both mine and colleagues machine. but on mine it fails and on his it succeeds.

> Heap space OOM
> --------------
>
>                 Key: MSOURCES-94
>                 URL: https://issues.apache.org/jira/browse/MSOURCES-94
>             Project: Maven Source Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>         Environment: Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
> Java version: 1.8.0_74, vendor: Oracle Corporation
> OS name: "linux", version: "3.19.0-32-generic", arch: "amd64", family: "unix"
>            Reporter: Stephan Schroevers
>
> After upgrading from version 2.4 to 3.0.0 our aggregate build (comprising 52 jar/war modules) started failing when run on Travis CI:
> {noformat}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-source-plugin:3.0.0:jar-no-fork (generate-source-jar) on project etl-executor-impl: Error creating source archive: Problem creating jar: Execution exception: Java heap space -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-source-plugin:3.0.0:jar-no-fork (generate-source-jar) on project etl-executor-impl: Error creating source archive: Problem creating jar: Execution exception
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
>     at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:188)
>     at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:184)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>     at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error creating source archive: Problem creating jar: Execution exception
>     at org.apache.maven.plugins.source.AbstractSourceJarMojo.packageSources(AbstractSourceJarMojo.java:311)
>     at org.apache.maven.plugins.source.AbstractSourceJarMojo.packageSources(AbstractSourceJarMojo.java:253)
>     at org.apache.maven.plugins.source.AbstractSourceJarMojo.execute(AbstractSourceJarMojo.java:216)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>     ... 11 more
> Caused by: org.codehaus.plexus.archiver.ArchiverException: Problem creating jar: Execution exception
>     at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:982)
>     at org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.java:650)
>     at org.apache.maven.plugins.source.AbstractSourceJarMojo.packageSources(AbstractSourceJarMojo.java:303)
>     ... 15 more
> Caused by: java.io.IOException: Execution exception
>     at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.close(AbstractZipArchiver.java:807)
>     at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:969)
>     ... 17 more
> Caused by: java.lang.OutOfMemoryError: Java heap space
>     at org.codehaus.plexus.archiver.zip.ByteArrayOutputStream.needNewBuffer(ByteArrayOutputStream.java:121)
>     at org.codehaus.plexus.archiver.zip.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:90)
>     at org.codehaus.plexus.archiver.zip.OffloadingOutputStream.<init>(OffloadingOutputStream.java:109)
>     at org.codehaus.plexus.archiver.zip.OffloadingOutputStream.<init>(OffloadingOutputStream.java:89)
>     at org.codehaus.plexus.archiver.zip.DeferredScatterOutputStream.<init>(DeferredScatterOutputStream.java:28)
>     at org.codehaus.plexus.archiver.zip.ConcurrentJarCreator$DeferredSupplier.get(ConcurrentJarCreator.java:47)
>     at org.apache.commons.compress.archivers.zip.ParallelScatterZipCreator.createDeferred(ParallelScatterZipCreator.java:75)
>     at org.apache.commons.compress.archivers.zip.ParallelScatterZipCreator.access$100(ParallelScatterZipCreator.java:54)
>     at org.apache.commons.compress.archivers.zip.ParallelScatterZipCreator$1.initialValue(ParallelScatterZipCreator.java:84)
>     at org.apache.commons.compress.archivers.zip.ParallelScatterZipCreator$1.initialValue(ParallelScatterZipCreator.java:80)
>     at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
>     at java.lang.ThreadLocal.get(ThreadLocal.java:170)
>     at org.apache.commons.compress.archivers.zip.ParallelScatterZipCreator$2.call(ParallelScatterZipCreator.java:175)
>     ... 4 more
> {noformat}
> I managed to reproduce this locally by comparing the following two commands:
> {noformat}
> # Runs fine in under 10 seconds
> MAVEN_OPTS=-Xmx128m mvn -e org.apache.maven.plugins:maven-source-plugin:2.4:jar
> # Fails already after the third module with source code, after some 7 seconds
> MAVEN_OPTS=-Xmx128m mvn -e org.apache.maven.plugins:maven-source-plugin:3.0.0:jar
> {noformat}
> Our project is closed-source, but I verified the issue can also be reproduced on a large Maven build such as the one of the [Jetty|https://github.com/eclipse/jetty.project] project.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)