Details
-
Bug
-
Status: Resolved (View Workflow)
-
Minor
-
Resolution: Fixed
Description
During archiving from a slave the untaring can fail with files > 8GB. This is because the tar creator makes a corrupt archive. I think it doesn't properly null terminate the size value when the file size is gets to the 12th digit - which is a violation of tar spec (from Wikipedia tar article: Numeric values are encoded in octal numbers using ASCII digits, with leading zeroes. For historical reasons, a final NUL or space character should be used. Thus although there are 12 bytes reserved for storing the file size, only 11 octal digits can be stored. This gives a maximum file size of 8 gigabytes on archived files.)
Changing to gnutar might be nice to handle large files, or at least making the library error out when it hits large files rather than happily building corrupt archives.
Error caused by this bug (due to reading the corrupt header):
Archiving artifacts
ERROR: Publisher hudson.tasks.ArtifactArchiver aborted due to exception
java.lang.IllegalArgumentException: Negative time
at java.io.File.setLastModified(File.java:1258)
at hudson.FilePath.readFromTar(FilePath.java:1605)
at hudson.FilePath.copyRecursiveTo(FilePath.java:1530)
at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:117)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:649)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:625)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:603)
at hudson.model.Build$RunnerImpl.post2(Build.java:161)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:572)
at hudson.model.Run.run(Run.java:1386)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
Finished: FAILURE
Attachments
Issue Links
- is duplicated by
-
JENKINS-25006 Archiving of huge files from remote workspace fails with exception
-
- Resolved
-
-
JENKINS-29140 Temporary file appears to leak data
-
- Resolved
-
- is related to
-
JENKINS-28013 Archiving artifiacts fails with java.io.IOException: Truncated TAR archive
-
- Resolved
-
-
JENKINS-28012 "Failed to parse POMs" during archiving of poms when running maven job
-
- Resolved
-
-
JENKINS-21905 intermittent Failed to archive artifacts: Failed to extract caused by Unexpected end of ZLIB input stream
-
- Closed
-
- links to
Code changed in jenkins
User: Kanstantsin Shautsou
Path:
core/pom.xml
core/src/main/java/hudson/FilePath.java
core/src/main/java/hudson/org/apache/tools/tar/TarInputStream.java
core/src/main/java/hudson/org/apache/tools/tar/TarOutputStream.java
core/src/main/java/hudson/util/io/TarArchiver.java
http://jenkins-ci.org/commit/jenkins/6e5740eb5be85ede0cbd01d900cb6d5fbf71ee62
Log:
Revert "Revert "
JENKINS-10629- Migrate the Tar archives handling code to commons-compress""This reverts commit 8f1280a85c54ea6150b15c38303464ab23b32e92.
(cherry picked from commit 03bd5959cb94a0e626c5ace910d14c3083a9db2c)