maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Rosenvold (JIRA)" <j...@codehaus.org>
Subject [jira] (MDEP-391) Unpack fails on linux with large archives
Date Wed, 28 Nov 2012 10:43:13 GMT

    [ https://jira.codehaus.org/browse/MDEP-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314536#comment-314536
] 

Kristian Rosenvold commented on MDEP-391:
-----------------------------------------

Ok, the root cause of your problem seems to be plexus-utils CommandLineUtils.getSystemEnvVars,
which does not properly
handle the process streams. (Specifically it does not drain error stream of process which
will leak pipes if output appears on stderr)

I created PLXUTILS-155 to deal with this.

The thing about the "useJvmChmod" is not relevant for this issue, but only came up because
I saw a stacktrace from your code ;)

                
> Unpack fails on linux with large archives
> -----------------------------------------
>
>                 Key: MDEP-391
>                 URL: https://jira.codehaus.org/browse/MDEP-391
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>          Components: unpack
>    Affects Versions: 2.6
>         Environment: Ubuntu 10.04 LTS
>            Reporter: Benoit Montuelle
>         Attachments: lsof.txt
>
>
> When unpacking "large " archives with numerous files (more than 1024 on this os) I got
the following error trace
> [INFO] Expanding /var/lib/deploy/.m2/repository/com/aprilwaf/wafservice/ihm-packaging-ecg/3.9-finsouscription-SNAPSHOT/ihm-packaging-ecg-3.9-finsouscription-SNAPSHOT-distribution-php.tar.gz
to /tmp/tmp5620480517649479513.tar
> [INFO] Expanding: /tmp/tmp5620480517649479513.tar into /var/lib/deploy/build-deploy/ecg/target/classes
> org.codehaus.plexus.archiver.ArchiverException: Error while executing chmod.
> 	at org.codehaus.plexus.archiver.util.ArchiveEntryUtils.chmod(ArchiveEntryUtils.java:64)
> 	at org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver.extractFile(AbstractZipUnArchiver.java:236)
> 	at org.codehaus.plexus.archiver.tar.TarUnArchiver.execute(TarUnArchiver.java:92)
> 	at org.codehaus.plexus.archiver.tar.TarGZipUnArchiver.execute(TarGZipUnArchiver.java:76)
> 	at org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArchiver.java:108)
> 	at org.apache.maven.plugin.dependency.AbstractDependencyMojo.unpack(AbstractDependencyMojo.java:260)
> 	at org.apache.maven.plugin.dependency.fromConfiguration.UnpackMojo.unpackArtifact(UnpackMojo.java:122)
> 	at org.apache.maven.plugin.dependency.fromConfiguration.UnpackMojo.execute(UnpackMojo.java:95)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> 	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.codehaus.plexus.util.cli.CommandLineException: Error while executing process.
> 	at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:652)
> 	at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:102)
> 	at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:89)
> 	at org.codehaus.plexus.archiver.util.ArchiveEntryUtils.chmod(ArchiveEntryUtils.java:45)
> 	... 26 more
> Caused by: java.io.IOException: Cannot run program "/bin/sh" (in directory "/var/lib/deploy/build-deploy/ecg/target/classes/symfony-1.4/lib/plugins/sfDoctrinePlugin/test/unit/record"):
java.io.IOException: error=24, Too many open files
> 	at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
> 	at java.lang.Runtime.exec(Runtime.java:593)
> 	at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:647)
> 	... 29 more
> Caused by: java.io.IOException: java.io.IOException: error=24, Too many open files
> 	at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
> 	at java.lang.ProcessImpl.start(ProcessImpl.java:65)
> 	at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
> 	... 31 more
> This error reproduce on every server tested, we already override linux file pointer limitations
for our developers systems but can't do this in these servers. 
> I guess 1024+ file pointers open to extract is not a good solution. 
> Btw I noticed the tar.cz if first unzipped to /tmp which can be problematic by eating
too much disk space during operation. 
> Could you have a look ? I guess we could go through other plugins in the meanwhile to
extract the tar.gz with command line

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message