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

Matrix job kills child job before post build actions have completed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None

      Child jobs occasionally fail to copy logs back to master node with

      INFO: test-job Ā» tomcat-test,suite1 #3 main build action completed: SUCCESS
      Dec 30, 2011 7:24:16 PM hudson.model.Run run
      INFO: test-job #3 main build action completed: UNSTABLE
      Dec 30, 2011 7:24:16 PM hudson.model.AbstractBuild$AbstractRunner performAllBuildSteps
      WARNING: Publisher com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier aborted due to exception
      hudson.util.IOException2: hudson.util.IOException2: Failed to extract /home/a/workspace/test-job/label/tomcat-test/suites/suite1/log/*
              at hudson.FilePath.readFromTar(FilePath.java:1698)
              at hudson.FilePath.copyRecursiveTo(FilePath.java:1616)
              at com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier.perform(CopyToMasterNotifier.java:82)
              at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
              at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
              at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
              at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:645)
              at hudson.model.Build$RunnerImpl.cleanUp(Build.java:171)
              at hudson.model.Run.run(Run.java:1448)
              at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
              at hudson.model.ResourceController.execute(ResourceController.java:88)
              at hudson.model.Executor.run(Executor.java:238)
      Caused by: java.io.IOException
              at hudson.remoting.FastPipedInputStream.read(FastPipedInputStream.java:175)
              at hudson.util.HeadBufferingStream.read(HeadBufferingStream.java:61)
              at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:221)
              at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
              at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:92)
              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:90)
              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:36)
              at hudson.FilePath.readFromTar(FilePath.java:1690)
              ... 11 more
      
              at hudson.FilePath.copyRecursiveTo(FilePath.java:1623)
              at com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier.perform(CopyToMasterNotifier.java:82)
              at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
              at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
              at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
              at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:645)
              at hudson.model.Build$RunnerImpl.cleanUp(Build.java:171)
              at hudson.model.Run.run(Run.java:1448)
              at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
              at hudson.model.ResourceController.execute(ResourceController.java:88)
              at hudson.model.Executor.run(Executor.java:238)
      Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Pipe is already closed
              at hudson.remoting.Channel$2.adapt(Channel.java:714)
              at hudson.remoting.Channel$2.adapt(Channel.java:709)
              at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59)
              at hudson.FilePath.copyRecursiveTo(FilePath.java:1619)
              ... 10 more
      Caused by: java.io.IOException: Pipe is already closed
              at hudson.remoting.PipeWindow.checkDeath(PipeWindow.java:83)
              at hudson.remoting.PipeWindow$Real.get(PipeWindow.java:171)
              at hudson.remoting.ProxyOutputStream._write(ProxyOutputStream.java:118)
              at hudson.remoting.ProxyOutputStream.write(ProxyOutputStream.java:103)
              at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
              at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109)
              at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:161)
              at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:118)
              at java.util.zip.GZIPOutputStream.write(GZIPOutputStream.java:72)
              at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
              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:119)
              at hudson.FilePath.writeToTar(FilePath.java:1670)
              at hudson.FilePath.access$1000(FilePath.java:164)
              at hudson.FilePath$33.invoke(FilePath.java:1609)
              at hudson.FilePath$33.invoke(FilePath.java:1606)
              at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2030)
              at hudson.remoting.UserRequest.perform(UserRequest.java:118)
              at hudson.remoting.UserRequest.perform(UserRequest.java:48)
              at hudson.remoting.Request$2.run(Request.java:287)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:662)
      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:211)
              ... 6 more
      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:155)
              at java.util.zip.InflaterInputStream.close(InflaterInputStream.java:210)
              at java.util.zip.GZIPInputStream.close(GZIPInputStream.java:113)
              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:1700)
              at hudson.FilePath.copyRecursiveTo(FilePath.java:1616)
              at com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier.perform(CopyToMasterNotifier.java:82)
              at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
              at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
              at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
              at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:645)
              at hudson.model.Build$RunnerImpl.cleanUp(Build.java:171)
              at hudson.model.Run.run(Run.java:1448)
              at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
              at hudson.model.ResourceController.execute(ResourceController.java:88)
              at hudson.model.Executor.run(Executor.java:238)
      

      Pipe is closed because it is interrupted from

      Thread 'Thread[Executor #2 for pylon : executing test-job y Ā» tomcat-test,suite1 #3,5,main] interrupted
      java.lang.Throwable
              at java.lang.Thread.interrupt(Thread.java:895)
              at hudson.model.Executor.interrupt(Executor.java:146)
              at hudson.model.Executor.interrupt(Executor.java:127)
              at hudson.model.Executor.interrupt(Executor.java:115)
              at hudson.matrix.MatrixBuild$RunnerImpl.doRun(MatrixBuild.java:320)
              at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:462)
              at hudson.model.Run.run(Run.java:1404)
              at hudson.matrix.MatrixBuild.run(MatrixBuild.java:219)
              at hudson.model.ResourceController.execute(ResourceController.java:88)
              at hudson.model.Executor.run(Executor.java:238)
              at hudson.model.OneOffExecutor.run(OneOffExecutor.java:66)
      

      As far as I can tell this happens because hudson.model.Run#run sets state = State.POST_PRODUCTION; before job.cleanUp(listener); which makes hudson.matrix.MatrixBuild#waitForCompletion believe that build has completed and interrupt the executor while copy to slave is still in progress.

            danielpetisme Daniel Petisme
            laurit Lauri Tulmin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: