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

Failed to archive artifacts, Failed to extract transfer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • remoting
    • None

      Recently (possibly after upgrade to 1.560 by unattended update process) we started having issues with the artefact archiving. The build fails with the below stacktrace:

      ERROR: Failed to archive artifacts: release/**
      java.io.IOException: java.io.IOException: Failed to extract /foo/.jenkins/workspace/bar/transfer of 424 files
          at hudson.FilePath.readFromTar(FilePath.java:2095)
          at hudson.FilePath.copyRecursiveTo(FilePath.java:2007)
          at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:57)
          at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:140)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:740)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:710)
          at hudson.model.Build$BuildExecution.post2(Build.java:182)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:659)
          at hudson.model.Run.execute(Run.java:1728)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:231)
      Caused by: java.io.IOException
          at hudson.remoting.FastPipedInputStream.read(FastPipedInputStream.java:177)
          at hudson.util.HeadBufferingStream.read(HeadBufferingStream.java:61)
          at com.jcraft.jzlib.InflaterInputStream.fill(InflaterInputStream.java:175)
          at com.jcraft.jzlib.InflaterInputStream.read(InflaterInputStream.java:106)
          at org.apache.tools.tar.TarBuffer.readBlock(TarBuffer.java:257)
          at org.apache.tools.tar.TarBuffer.readRecord(TarBuffer.java:223)
          at hudson.org.apache.tools.tar.TarInputStream.read(TarInputStream.java:345)
          at java.io.FilterInputStream.read(FilterInputStream.java:107)
          at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792)
          at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769)
          at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744)
          at hudson.util.IOUtils.copy(IOUtils.java:40)
          at hudson.FilePath.readFromTar(FilePath.java:2085)
          ... 12 more
      
          at hudson.FilePath.copyRecursiveTo(FilePath.java:2014)
          at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:57)
          at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:140)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:740)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:710)
          at hudson.model.Build$BuildExecution.post2(Build.java:182)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:659)
          at hudson.model.Run.execute(Run.java:1728)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:231)
      Caused by: java.util.concurrent.ExecutionException: hudson.remoting.RequestAbortedException: java.io.IOException: Unexpected reader termination
          at hudson.remoting.Request$1.get(Request.java:278)
          at hudson.remoting.Request$1.get(Request.java:210)
          at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59)
          at hudson.FilePath.copyRecursiveTo(FilePath.java:2010)
          ... 11 more
      Caused by: hudson.remoting.RequestAbortedException: java.io.IOException: Unexpected reader termination
          at hudson.remoting.Request.abort(Request.java:299)
          at hudson.remoting.Channel.terminate(Channel.java:801)
          at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:76)
      Caused by: java.io.IOException: Unexpected reader termination
          ... 1 more
      Caused by: java.lang.OutOfMemoryError: Java heap space
          at java.util.Arrays.copyOf(Arrays.java:2271)
          at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:113)
          at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
          at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:140)
          at hudson.remoting.FlightRecorderInputStream.read(FlightRecorderInputStream.java:87)
          at hudson.remoting.ChunkedInputStream.read(ChunkedInputStream.java:46)
          at hudson.remoting.ChunkedInputStream.readUntilBreak(ChunkedInputStream.java:88)
          at hudson.remoting.ChunkedCommandTransport.readBlock(ChunkedCommandTransport.java:33)
          at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
          at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
      Build step 'Archive the artifacts' changed build result to FAILURE
      Finished: FAILURE
      

      After the first such failure I increased the heap size to 1024mb (was 512mb before), but still got the same result.

      This post mentions someone increased the heap to 8gb, but still had the problem:

      http://jenkins-ci.361315.n4.nabble.com/Problems-with-memory-usage-on-1-560-td4699645.html

      I have downgraded to 1.599 now, to see if that can be used as a work-around for now. Will report when the build is done (this takes a few hours).

            Unassigned Unassigned
            gmc Koen Martens
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: