Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-7758

Copy Artifact Plugin aborts job with java.lang.NegativeArraySizeException

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • None
    • AIX, Hudson 1.380, Copy Artifact plugin 1.1 and 1.10

      This issue started after upgrading from Hudson 1.355 to 1.380

      Jobs where the copy artifact plugin used to work properly now abort with the message:
      FATAL: null
      java.lang.NegativeArraySizeException
      at hudson.remoting.ProxyOutputStream$Chunk.<init>(ProxyOutputStream.java:175)
      at hudson.remoting.ProxyOutputStream._write(ProxyOutputStream.java:123)
      at hudson.remoting.ProxyOutputStream.write(ProxyOutputStream.java:103)
      at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
      at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109)
      at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:161)
      at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:118)
      at java.util.zip.GZIPOutputStream.write(GZIPOutputStream.java:72)
      at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
      at org.apache.tools.tar.TarBuffer.writeBlock(TarBuffer.java:410)
      at org.apache.tools.tar.TarBuffer.writeRecord(TarBuffer.java:351)
      at hudson.org.apache.tools.tar.TarOutputStream.writeEOFRecord(TarOutputStream.java:356)
      at hudson.org.apache.tools.tar.TarOutputStream.finish(TarOutputStream.java:137)
      at hudson.org.apache.tools.tar.TarOutputStream.close(TarOutputStream.java:149)
      at hudson.util.io.TarArchiver.close(TarArchiver.java:114)
      at hudson.FilePath.writeToTar(FilePath.java:1545)
      at hudson.FilePath.copyRecursiveTo(FilePath.java:1470)
      at hudson.FilePath.copyRecursiveTo(FilePath.java:1399)
      at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:172)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601)
      at hudson.model.Build$RunnerImpl.build(Build.java:174)
      at hudson.model.Build$RunnerImpl.doRun(Build.java:138)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
      at hudson.model.Run.run(Run.java:1280)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:140)

      This has made the jobs unusable!

          [JENKINS-7758] Copy Artifact Plugin aborts job with java.lang.NegativeArraySizeException

          kevinp2 added a comment -

          Hi guys,

          Any luck with this issue? All the jobs that I use with CopyArtifact are broken and I will have to hack the jobs to get them to work again. This would be a big step backwards

          kevinp2 added a comment - Hi guys, Any luck with this issue? All the jobs that I use with CopyArtifact are broken and I will have to hack the jobs to get them to work again. This would be a big step backwards

          bluecarat added a comment -

          Hi,

          we get the same Exception with Version 1.386.
          We don't use the Copy Artifact Plugin but we are using a master-slave cluster, also.

          The build exits with an "java.lang.IllegalStateException: Unable to call isArchivingDisabled. Invalid object ID 13" (we have Findbugs, PMD and Checkstyle publishing disabled). I haven't had the time to figure out which of these plugins is responsible for the NegativeArraySizeException.

          So it seems that this problem may not entirely be related to the Copy Artifact Plugin.

          Our problem does not occur with Hudson 1.372 but I have not yet tested the master-slave cluster.

          Cheers, Chris

          bluecarat added a comment - Hi, we get the same Exception with Version 1.386. We don't use the Copy Artifact Plugin but we are using a master-slave cluster, also. The build exits with an "java.lang.IllegalStateException: Unable to call isArchivingDisabled. Invalid object ID 13" (we have Findbugs, PMD and Checkstyle publishing disabled). I haven't had the time to figure out which of these plugins is responsible for the NegativeArraySizeException. So it seems that this problem may not entirely be related to the Copy Artifact Plugin. Our problem does not occur with Hudson 1.372 but I have not yet tested the master-slave cluster. Cheers, Chris

          u333992 added a comment -

          Hi,

          we had the same excpetion with Version 1.386 when running mvn site. It doesn't occur all the time but has been a couple of times.

          u333992 added a comment - Hi, we had the same excpetion with Version 1.386 when running mvn site. It doesn't occur all the time but has been a couple of times.

          mlb5000 added a comment -

          Also selecting CopyArtifact as a component on this bug since it may be related to them

          mlb5000 added a comment - Also selecting CopyArtifact as a component on this bug since it may be related to them

          Alan Harder added a comment -

          Alan Harder added a comment - See https://github.com/hudson/hudson/pull/21

          Alan Harder added a comment -

          Please retest this once 1.397 is out, to determine if this is a duplicate of JENKINS-7745

          Alan Harder added a comment - Please retest this once 1.397 is out, to determine if this is a duplicate of JENKINS-7745

          youngm added a comment - - edited

          I still get this error with 1.397.

          youngm added a comment - - edited I still get this error with 1.397.

          youngm added a comment - - edited

          Here is a copy of my stacktrace in 1.397:

          org.apache.maven.InternalErrorException: Internal error: java.lang.NegativeArraySizeException
          at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
          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.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
          at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:145)
          at hudson.maven.Maven3Builder.call(Maven3Builder.java:124)
          at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
          at hudson.remoting.UserRequest.perform(UserRequest.java:114)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:270)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)
          Caused by: java.lang.NegativeArraySizeException
          at hudson.remoting.ProxyOutputStream$Chunk.<init>(ProxyOutputStream.java:175)
          at hudson.remoting.ProxyOutputStream._write(ProxyOutputStream.java:123)
          at hudson.remoting.ProxyOutputStream.write(ProxyOutputStream.java:103)
          at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
          at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109)
          at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:161)
          at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:118)
          at java.util.zip.GZIPOutputStream.write(GZIPOutputStream.java:72)
          at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
          at org.apache.tools.tar.TarBuffer.writeBlock(TarBuffer.java:410)
          at org.apache.tools.tar.TarBuffer.writeRecord(TarBuffer.java:351)
          at hudson.org.apache.tools.tar.TarOutputStream.writeEOFRecord(TarOutputStream.java:356)
          at hudson.org.apache.tools.tar.TarOutputStream.finish(TarOutputStream.java:137)
          at hudson.org.apache.tools.tar.TarOutputStream.close(TarOutputStream.java:149)
          at hudson.util.io.TarArchiver.close(TarArchiver.java:114)
          at hudson.FilePath.writeToTar(FilePath.java:1579)
          at hudson.FilePath.copyRecursiveTo(FilePath.java:1504)
          at hudson.FilePath.copyRecursiveTo(FilePath.java:1433)
          at hudson.maven.reporters.MavenSiteArchiver.postExecute(MavenSiteArchiver.java:81)
          at hudson.maven.Maven3Builder$MavenExecutionListener.reccordMojoSucceeded(Maven3Builder.java:568)
          at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:531)
          at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87)
          at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228)
          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:84)
          ... 24 more

          youngm added a comment - - edited Here is a copy of my stacktrace in 1.397: org.apache.maven.InternalErrorException: Internal error: java.lang.NegativeArraySizeException at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) 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.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:145) at hudson.maven.Maven3Builder.call(Maven3Builder.java:124) at hudson.maven.Maven3Builder.call(Maven3Builder.java:71) at hudson.remoting.UserRequest.perform(UserRequest.java:114) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NegativeArraySizeException at hudson.remoting.ProxyOutputStream$Chunk.<init>(ProxyOutputStream.java:175) at hudson.remoting.ProxyOutputStream._write(ProxyOutputStream.java:123) at hudson.remoting.ProxyOutputStream.write(ProxyOutputStream.java:103) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109) at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:161) at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:118) at java.util.zip.GZIPOutputStream.write(GZIPOutputStream.java:72) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105) at org.apache.tools.tar.TarBuffer.writeBlock(TarBuffer.java:410) at org.apache.tools.tar.TarBuffer.writeRecord(TarBuffer.java:351) at hudson.org.apache.tools.tar.TarOutputStream.writeEOFRecord(TarOutputStream.java:356) at hudson.org.apache.tools.tar.TarOutputStream.finish(TarOutputStream.java:137) at hudson.org.apache.tools.tar.TarOutputStream.close(TarOutputStream.java:149) at hudson.util.io.TarArchiver.close(TarArchiver.java:114) at hudson.FilePath.writeToTar(FilePath.java:1579) at hudson.FilePath.copyRecursiveTo(FilePath.java:1504) at hudson.FilePath.copyRecursiveTo(FilePath.java:1433) at hudson.maven.reporters.MavenSiteArchiver.postExecute(MavenSiteArchiver.java:81) at hudson.maven.Maven3Builder$MavenExecutionListener.reccordMojoSucceeded(Maven3Builder.java:568) at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:531) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228) 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:84) ... 24 more

          youngm added a comment -

          I believe this is now fixed in 1.397. My slave.jar wasn't upgraded before.

          youngm added a comment - I believe this is now fixed in 1.397. My slave.jar wasn't upgraded before.

          Alan Harder added a comment -

          Great, thanks for reporting back.
          Marking issue resolved, please reopen if anyone still sees this.

          Alan Harder added a comment - Great, thanks for reporting back. Marking issue resolved, please reopen if anyone still sees this.

            kohsuke Kohsuke Kawaguchi
            kevinp2 kevinp2
            Votes:
            13 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: