java.io.IOException: Failed to extract /var/lib/jenkins/workspace/cape_develop/transfer of 1 files

Jenkins JIRA | John Mellor | 2 years ago
  1. 0

    Updating from Jenkins 1.609 to 1.610 causes artifacts that are actually present to become invisible to Jenkins, causing incorrect product build failures. I have multiple builds showing the same problem using several different build mechanisms. All show a bogus failure to see the artifact. All components and plugins are up-to-date. Reverting back to Jenkins 1.609 corrects the problem. Example build log excerpt showing impossible operation follows. The artifact is successfully moved to a subdir, followed by several empty build steps (commented out to isolate the bug), followed by artifact archiving in the post-build actions. The missing artifact is actually present in the expected place, as verified manually. However, Jenkins cannot see it. Possible fatal error in the artifact archiving code in 1.610? . . . 00:05:26.255 + mkdir -p build/trusty 00:05:26.257 + mv build/cape_1.6.0-1~develop~e239_amd64.deb build/trusty/ 00:05:26.275 + exit 0 00:05:26.295 [cape_develop] $ /bin/bash -xe /tmp/hudson3392614376804147389.sh 00:05:26.339 [cape_develop] $ /bin/bash -xe /tmp/hudson150957069606062707.sh 00:05:26.376 [cape_develop] $ /bin/bash -xe /tmp/hudson2456916382110583231.sh 00:05:26.417 [cape_develop] $ /bin/bash -xe /tmp/hudson782672795510148539.sh 00:05:26.454 [cape_develop] $ /bin/bash -xe /tmp/hudson3270660334305912197.sh 00:05:27.502 Archiving artifacts 00:05:32.094 ERROR: Failed to archive artifacts: build/trusty/*.deb 00:05:32.094 java.io.IOException: Failed to extract /var/lib/jenkins/workspace/cape_develop/transfer of 1 files 00:05:32.094 at hudson.FilePath.readFromTar(FilePath.java:2299) 00:05:32.094 at hudson.FilePath.copyRecursiveTo(FilePath.java:2208) 00:05:32.094 at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61) 00:05:32.094 at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:219) 00:05:32.094 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:74) 00:05:32.094 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 00:05:32.094 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) 00:05:32.094 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721) 00:05:32.094 at hudson.model.Build$BuildExecution.post2(Build.java:183) 00:05:32.094 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670) 00:05:32.094 at hudson.model.Run.execute(Run.java:1766) 00:05:32.094 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 00:05:32.094 at hudson.model.ResourceController.execute(ResourceController.java:98) 00:05:32.094 at hudson.model.Executor.run(Executor.java:374) 00:05:32.094 Caused by: java.io.IOException: Truncated TAR archive 00:05:32.094 at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:614) 00:05:32.094 at java.io.InputStream.read(InputStream.java:101) 00:05:32.094 at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792) 00:05:32.094 at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769) 00:05:32.094 at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744) 00:05:32.094 at hudson.util.IOUtils.copy(IOUtils.java:40) 00:05:32.094 at hudson.FilePath.readFromTar(FilePath.java:2289) 00:05:32.094 ... 13 more 00:05:32.094 Build step 'Archive the artifacts' changed build result to FAILURE

    Jenkins JIRA | 2 years ago | John Mellor
    java.io.IOException: Failed to extract /var/lib/jenkins/workspace/cape_develop/transfer of 1 files
  2. 0

    Updating from Jenkins 1.609 to 1.610 causes artifacts that are actually present to become invisible to Jenkins, causing incorrect product build failures. I have multiple builds showing the same problem using several different build mechanisms. All show a bogus failure to see the artifact. All components and plugins are up-to-date. Reverting back to Jenkins 1.609 corrects the problem. Example build log excerpt showing impossible operation follows. The artifact is successfully moved to a subdir, followed by several empty build steps (commented out to isolate the bug), followed by artifact archiving in the post-build actions. The missing artifact is actually present in the expected place, as verified manually. However, Jenkins cannot see it. Possible fatal error in the artifact archiving code in 1.610? . . . 00:05:26.255 + mkdir -p build/trusty 00:05:26.257 + mv build/cape_1.6.0-1~develop~e239_amd64.deb build/trusty/ 00:05:26.275 + exit 0 00:05:26.295 [cape_develop] $ /bin/bash -xe /tmp/hudson3392614376804147389.sh 00:05:26.339 [cape_develop] $ /bin/bash -xe /tmp/hudson150957069606062707.sh 00:05:26.376 [cape_develop] $ /bin/bash -xe /tmp/hudson2456916382110583231.sh 00:05:26.417 [cape_develop] $ /bin/bash -xe /tmp/hudson782672795510148539.sh 00:05:26.454 [cape_develop] $ /bin/bash -xe /tmp/hudson3270660334305912197.sh 00:05:27.502 Archiving artifacts 00:05:32.094 ERROR: Failed to archive artifacts: build/trusty/*.deb 00:05:32.094 java.io.IOException: Failed to extract /var/lib/jenkins/workspace/cape_develop/transfer of 1 files 00:05:32.094 at hudson.FilePath.readFromTar(FilePath.java:2299) 00:05:32.094 at hudson.FilePath.copyRecursiveTo(FilePath.java:2208) 00:05:32.094 at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61) 00:05:32.094 at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:219) 00:05:32.094 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:74) 00:05:32.094 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 00:05:32.094 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) 00:05:32.094 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721) 00:05:32.094 at hudson.model.Build$BuildExecution.post2(Build.java:183) 00:05:32.094 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670) 00:05:32.094 at hudson.model.Run.execute(Run.java:1766) 00:05:32.094 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 00:05:32.094 at hudson.model.ResourceController.execute(ResourceController.java:98) 00:05:32.094 at hudson.model.Executor.run(Executor.java:374) 00:05:32.094 Caused by: java.io.IOException: Truncated TAR archive 00:05:32.094 at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:614) 00:05:32.094 at java.io.InputStream.read(InputStream.java:101) 00:05:32.094 at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792) 00:05:32.094 at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769) 00:05:32.094 at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744) 00:05:32.094 at hudson.util.IOUtils.copy(IOUtils.java:40) 00:05:32.094 at hudson.FilePath.readFromTar(FilePath.java:2289) 00:05:32.094 ... 13 more 00:05:32.094 Build step 'Archive the artifacts' changed build result to FAILURE

    Jenkins JIRA | 2 years ago | John Mellor
    java.io.IOException: Failed to extract /var/lib/jenkins/workspace/cape_develop/transfer of 1 files
  3. 0

    [JENKINS-28013] Archiving artifiacts fails with java.io.IOException: Truncated TAR archive - Jenkins JIRA

    jenkins-ci.org | 4 months ago
    java.io.IOException: Failed to extract /srv/user_name/.jenkins/workspace/SomeProject/distro/sles11_64/servertype/build/transfer of 4 files
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The 'archive artifacts' step of some build jobs have recently started failing with the following trace: {code} Archiving artifacts ERROR: Failed to archive artifacts: **/*.deb, **/*.changes, **/*.rpm, **/*.egg java.io.IOException: Failed to extract /srv/user_name/.jenkins/workspace/SomeProject/distro/sles11_64/servertype/build/transfer of 4 files at hudson.FilePath.readFromTar(FilePath.java:2299) at hudson.FilePath.copyRecursiveTo(FilePath.java:2208) at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:219) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:74) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670) at hudson.model.Run.execute(Run.java:1766) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Caused by: java.io.IOException: Truncated TAR archive at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:614) at java.io.InputStream.read(InputStream.java:101) 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:2289) ... 13 more Build step 'Archive the artifacts' changed build result to FAILURE {code} It seems that the jobs on the slaves succeeded, but the master fails: {code} Apr 20, 2015 11:15:14 AM hudson.model.Run execute INFO: SomeProject/distro=sles11_64,servertype=build #12159 main build action completed: SUCCESS [... more slave SUCCESS reports ...] Apr 20, 2015 11:16:16 AM hudson.model.Run execute INFO: SomeProject #12159 main build action completed: FAILURE {code} The master and slave logs do not show me any other errors. This failure occurs just for some of the slave jobs in this matrix build job. Within a specific job, this fails consistently for the same slaves, but across jobs the slaves that fail vary. There are no obvious resource issues; both disk space and memory usage seem to be fine.

    Jenkins JIRA | 2 years ago | Steffan Karger
    java.io.IOException: Failed to extract /srv/user_name/.jenkins/workspace/SomeProject/distro/sles11_64/servertype/build/transfer of 4 files
  6. 0

    The 'archive artifacts' step of some build jobs have recently started failing with the following trace: {code} Archiving artifacts ERROR: Failed to archive artifacts: **/*.deb, **/*.changes, **/*.rpm, **/*.egg java.io.IOException: Failed to extract /srv/user_name/.jenkins/workspace/SomeProject/distro/sles11_64/servertype/build/transfer of 4 files at hudson.FilePath.readFromTar(FilePath.java:2299) at hudson.FilePath.copyRecursiveTo(FilePath.java:2208) at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61) at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:219) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:74) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670) at hudson.model.Run.execute(Run.java:1766) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Caused by: java.io.IOException: Truncated TAR archive at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:614) at java.io.InputStream.read(InputStream.java:101) 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:2289) ... 13 more Build step 'Archive the artifacts' changed build result to FAILURE {code} It seems that the jobs on the slaves succeeded, but the master fails: {code} Apr 20, 2015 11:15:14 AM hudson.model.Run execute INFO: SomeProject/distro=sles11_64,servertype=build #12159 main build action completed: SUCCESS [... more slave SUCCESS reports ...] Apr 20, 2015 11:16:16 AM hudson.model.Run execute INFO: SomeProject #12159 main build action completed: FAILURE {code} The master and slave logs do not show me any other errors. This failure occurs just for some of the slave jobs in this matrix build job. Within a specific job, this fails consistently for the same slaves, but across jobs the slaves that fail vary. There are no obvious resource issues; both disk space and memory usage seem to be fine.

    Jenkins JIRA | 2 years ago | Steffan Karger
    java.io.IOException: Failed to extract /srv/user_name/.jenkins/workspace/SomeProject/distro/sles11_64/servertype/build/transfer of 4 files

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      Truncated TAR archive

      at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read()
    2. Apache Commons Compress
      TarArchiveInputStream.read
      1. org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:614)
      1 frame
    3. Java RT
      InputStream.read
      1. java.io.InputStream.read(InputStream.java:101)
      1 frame
    4. Commons IO
      IOUtils.copy
      1. org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792)
      2. org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769)
      3. org.apache.commons.io.IOUtils.copy(IOUtils.java:1744)
      3 frames
    5. Hudson
      FilePath.copyRecursiveTo
      1. hudson.util.IOUtils.copy(IOUtils.java:40)
      2. hudson.FilePath.readFromTar(FilePath.java:2289)
      3. hudson.FilePath.copyRecursiveTo(FilePath.java:2208)
      3 frames
    6. jenkins.model
      StandardArtifactManager.archive
      1. jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
      1 frame
    7. Hudson
      Executor.run
      1. hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:219)
      2. hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:74)
      3. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      4. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
      6. hudson.model.Build$BuildExecution.post2(Build.java:183)
      7. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
      8. hudson.model.Run.execute(Run.java:1766)
      9. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      10. hudson.model.ResourceController.execute(ResourceController.java:98)
      11. hudson.model.Executor.run(Executor.java:374)
      11 frames