-
Bug
-
Resolution: Unresolved
-
Minor
-
None
When I try to cancel a build that is running the "Archive the Artifacts" post build action, the build fails with a large stack trace.
I noticed this on version 1.553 and was able to reproduce on the current version. Steps to take are as follows:
1. Start a build on a slave that will archive artifacts.
2. When the build reaches the archiving step, cancel it.
3. See console output for error and build is now failed.
Stack trace:
ERROR: Failed to archive artifacts: **/*
java.io.IOException: java.io.IOException: Failed to extract /home/jenkins/workspace/
/transfer of 29 files
at hudson.FilePath.readFromTar(FilePath.java:2111)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2023)
at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:217)
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:770)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
at hudson.model.Run.execute(Run.java:1770)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
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:2101)
... 13 more
at hudson.FilePath.copyRecursiveTo(FilePath.java:2030)
at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:217)
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:770)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
at hudson.model.Run.execute(Run.java:1770)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Pipe is already closed
at hudson.remoting.Channel$3.adapt(Channel.java:772)
at hudson.remoting.Channel$3.adapt(Channel.java:767)
at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2026)
... 12 more
Caused by: java.io.IOException: Pipe is already closed
at hudson.remoting.PipeWindow.checkDeath(PipeWindow.java:108)
at hudson.remoting.PipeWindow$Real.get(PipeWindow.java:203)
at hudson.remoting.ProxyOutputStream._write(ProxyOutputStream.java:141)
at hudson.remoting.ProxyOutputStream.write(ProxyOutputStream.java:109)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:93)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:137)
at com.jcraft.jzlib.DeflaterOutputStream.deflate(DeflaterOutputStream.java:144)
at com.jcraft.jzlib.DeflaterOutputStream.write(DeflaterOutputStream.java:102)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:133)
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:125)
at hudson.FilePath.writeToTar(FilePath.java:2077)
at hudson.FilePath.access$1000(FilePath.java:181)
at hudson.FilePath$41.invoke(FilePath.java:2016)
at hudson.FilePath$41.invoke(FilePath.java:2012)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2484)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:273)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1170)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:640)
at java.lang.Thread.run(Thread.java:853)
Caused by: java.io.IOException: Pipe is already closed
at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:153)
at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:137)
at hudson.remoting.ProxyOutputStream$Chunk$1.run(ProxyOutputStream.java:264)
at hudson.remoting.PipeWriter$1.run(PipeWriter.java:158)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: hudson.remoting.FastPipedInputStream$ClosedBy: The pipe was closed at...
at hudson.remoting.FastPipedInputStream.close(FastPipedInputStream.java:112)
at java.io.FilterInputStream.close(FilterInputStream.java:181)
at com.jcraft.jzlib.InflaterInputStream.close(InflaterInputStream.java:168)
at org.apache.tools.tar.TarBuffer.close(TarBuffer.java:456)
at hudson.org.apache.tools.tar.TarInputStream.close(TarInputStream.java:110)
at hudson.FilePath.readFromTar(FilePath.java:2118)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2023)
at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:217)
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:770)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
at hudson.model.Run.execute(Run.java:1770)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)