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

CopyToSlave fails on Pipe Already Closed Exception, Root Cause may be ZLIB EOFException

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: copy-to-slave-plugin
    • Labels:
      None
    • Environment:
      Jenkins Master, Debian Squeeze running Jenkins 1.533.
      Jenkins Slaves, CentOS 6.4 x86_64
    • Similar Issues:

      Description

      Prior to upgrading from 1.510 to 1.533 the CoypToSlave (version 1.3 I think) was working without any errors. After upgrading to Jenkins 1.533 the plugin would fail with a "Pipe already closed" exception.

      I cloned the git repository from https://github.com/jenkinsci/copy-to-slave-plugin and attempted to debug/fix what I believed was a double close error. I have a working branch where I'm no longer getting a double close error but an exception caused by "Unexpected end of ZLIB input stream" AFTER all the files have been copied to the remote. My current working branch ignores the failure as a short term fix for my environment.

      My working code can be found at:

      https://github.com/cmdrclueless/copy-to-slave-plugin/tree/pipe_already_closed

      The current exception stack track follows:

      Building remotely on lpiq-42-166 in workspace /backup/jenkins/workspace/liquibase-migrations
      [copy-to-slave] Copying 'liquibase-backups/*/', excluding nothing, from 'file:/var/lib/jenkins/userContent/' on the master to 'file:/backup/jenkins/workspace/liquibase-migrations/' on 'lpiq-42-166'.
      processing entry: name liquibase-backups/backup-3.1.0.31-20121018102044.dat, size 133193737, directory false
      processing entry: name liquibase-backups/backup-4.0.1.4-20130226010513.dat, size 191426758, directory false
      processing entry: name liquibase-backups/backup-4.0.2.8-20130327010513.dat, size 116593913, directory false
      processing entry: name liquibase-backups/database-install.pl, size 6697, directory false
      processing entry: name liquibase-backups/test-backup-4.0.0.37-20121211095951.dat, size 10641581, directory false
      FATAL: hudson.util.IOException2: Failed to extract to /backup/jenkins/workspace/liquibase-migrations
      hudson.util.IOException2: hudson.util.IOException2: Failed to extract to /backup/jenkins/workspace/liquibase-migrations
      at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath.copyRecursiveTo(MyFilePath.java:166)
      at com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper.setUp(CopyToSlaveBuildWrapper.java:138)
      at hudson.model.Build$BuildExecution.doRun(Build.java:154)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:567)
      at hudson.model.Run.execute(Run.java:1665)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:246)
      Caused by: java.util.concurrent.ExecutionException: hudson.util.IOException2: Failed to extract to /backup/jenkins/workspace/liquibase-migrations
      at hudson.remoting.Channel$3.adapt(Channel.java:747)
      at hudson.remoting.Channel$3.adapt(Channel.java:742)
      at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
      at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath.copyRecursiveTo(MyFilePath.java:162)
      ... 7 more
      Caused by: hudson.util.IOException2: Failed to extract to /backup/jenkins/workspace/liquibase-migrations
      at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath.readFromTar(MyFilePath.java:236)
      at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath$2.invoke(MyFilePath.java:144)
      at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath$2.invoke(MyFilePath.java:139)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2444)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      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:724)
      Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
      at com.jcraft.jzlib.InflaterInputStream.fill(InflaterInputStream.java:186)
      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:1025)
      at org.apache.commons.io.IOUtils.copy(IOUtils.java:999)
      at hudson.util.IOUtils.copy(IOUtils.java:37)
      at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath.readFromTar(MyFilePath.java:212)
      ... 12 more

        Attachments

          Activity

          Hide
          cmdrclueless Brian Weaver added a comment -

          I found the original stack trace before I started making changes.

          Building remotely on lpiq-42-166 in workspace <http://nerve121.raleigh.raritan.com/job/liquibase-migrations/ws/>
          [copy-to-slave] Copying 'liquibase-backups/*/', excluding nothing, from 'file:/var/lib/jenkins/userContent/' on the master to '<http://nerve121.raleigh.raritan.com/job/liquibase-migrations/ws/'> on 'lpiq-42-166'.
          FATAL: Pipe is already closed
          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:135)
          at hudson.remoting.ProxyOutputStream.write(ProxyOutputStream.java:103)
          at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
          at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)
          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:122)
          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:126)
          at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath.writeToTar(MyFilePath.java:230)
          at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath.copyRecursiveTo(MyFilePath.java:143)
          at com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper.setUp(CopyToSlaveBuildWrapper.java:133)
          at hudson.model.Build$BuildExecution.doRun(Build.java:154)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:567)
          at hudson.model.Run.execute(Run.java:1665)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:246)
          Caused by: java.io.IOException: Pipe is already closed
          at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:147)
          at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:131)
          at hudson.remoting.ProxyOutputStream$Chunk$1.run(ProxyOutputStream.java:250)
          at hudson.remoting.PipeWriter$1.run(PipeWriter.java:158)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          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:724)
          Caused by: hudson.remoting.FastPipedInputStream$ClosedBy: The pipe was closed at...
          at hudson.remoting.FastPipedInputStream.close(FastPipedInputStream.java:112)
          at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath$2.invoke(MyFilePath.java:138)
          at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath$2.invoke(MyFilePath.java:130)
          at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2444)
          at hudson.remoting.UserRequest.perform(UserRequest.java:118)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:326)
          ... 6 more

          Show
          cmdrclueless Brian Weaver added a comment - I found the original stack trace before I started making changes. Building remotely on lpiq-42-166 in workspace < http://nerve121.raleigh.raritan.com/job/liquibase-migrations/ws/ > [copy-to-slave] Copying 'liquibase-backups/* / ', excluding nothing, from 'file:/var/lib/jenkins/userContent/' on the master to '< http://nerve121.raleigh.raritan.com/job/liquibase-migrations/ws/ '> on 'lpiq-42-166'. FATAL: Pipe is already closed 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:135) at hudson.remoting.ProxyOutputStream.write(ProxyOutputStream.java:103) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126) 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:122) 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:126) at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath.writeToTar(MyFilePath.java:230) at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath.copyRecursiveTo(MyFilePath.java:143) at com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper.setUp(CopyToSlaveBuildWrapper.java:133) at hudson.model.Build$BuildExecution.doRun(Build.java:154) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:567) at hudson.model.Run.execute(Run.java:1665) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Caused by: java.io.IOException: Pipe is already closed at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:147) at hudson.remoting.FastPipedOutputStream.write(FastPipedOutputStream.java:131) at hudson.remoting.ProxyOutputStream$Chunk$1.run(ProxyOutputStream.java:250) at hudson.remoting.PipeWriter$1.run(PipeWriter.java:158) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) 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:724) Caused by: hudson.remoting.FastPipedInputStream$ClosedBy: The pipe was closed at... at hudson.remoting.FastPipedInputStream.close(FastPipedInputStream.java:112) at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath$2.invoke(MyFilePath.java:138) at com.michelin.cio.hudson.plugins.copytoslave.MyFilePath$2.invoke(MyFilePath.java:130) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2444) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) ... 6 more

            People

            • Assignee:
              svvivek Vivekanand SV
              Reporter:
              cmdrclueless Brian Weaver
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: