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

Job hangs on copying artifacts build step if artifacts exist

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: copyartifact-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      I just tried the copy-artifact plugin and added it to an existing job which checks out from git, pulls in some artifacts (previously using `curl`) and then runs a script.

      Config:

      Artifacts to copy:  **/bin/*.apk
      Stable build only:  Yes
      Target directory:   <blank>
      

      Now the job hangs for five minutes before failing with the following stacktrace:

      ERROR: Failed to copy artifacts from MBP_1.0_APK with filter: **/bin/*.apk
      hudson.util.IOException2: hudson.remoting.RequestAbortedException: java.io.EOFException
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:1467)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:1393)
      	at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:117)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582)
      	at hudson.model.Build$RunnerImpl.build(Build.java:165)
      	at hudson.model.Build$RunnerImpl.doRun(Build.java:132)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
      	at hudson.model.Run.run(Run.java:1240)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:122)
      Caused by: java.util.concurrent.ExecutionException: hudson.remoting.RequestAbortedException: java.io.EOFException
      	at hudson.remoting.Request$1.get(Request.java:218)
      	at hudson.remoting.Request$1.get(Request.java:172)
      	at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:1465)
      	... 11 more
      Caused by: hudson.remoting.RequestAbortedException: java.io.EOFException
      	at hudson.remoting.Request.abort(Request.java:257)
      	at hudson.remoting.Channel.terminate(Channel.java:598)
      	at hudson.remoting.Channel$ReaderThread.run(Channel.java:876)
      Caused by: java.io.EOFException
      	at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2570)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1314)
      	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
      	at hudson.remoting.Channel$ReaderThread.run(Channel.java:856)
      FATAL: channel is already closed
      hudson.remoting.ChannelClosedException: channel is already closed
      	at hudson.remoting.Channel.send(Channel.java:412)
      	at hudson.remoting.Request.call(Request.java:105)
      	at hudson.remoting.Channel.call(Channel.java:551)
      	at hudson.Launcher$RemoteLauncher.kill(Launcher.java:735)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:421)
      	at hudson.model.Run.run(Run.java:1240)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:122)
      

      Without using the copy-artifact plugin, these same jobs on the same slaves run without problem, including archiving and fingerprinting artifacts.

      I also tried setting the path without wildcards, pointing directly to one of the artifacts I want to copy, but it still hangs. The job does not hang if I change the "Artifacts to copy" to a non-existent path; it just says "Copied 0 artifacts from <job>".


      If I abort the job before this five minute timeout, then the job is left hanging on "Archiving artifacts". Pressing abort again hangs on "Recording fingerprints". Aborting a third time stops the job.

      The stack trace for this case is below:

      Recording changes in branch origin/master
      [artifact_test] $ git log --pretty=format:%H f2c3a8ecb5cccfde2bf372c7e3c32b6d9754d9d8..f2c3a8ecb5cccfde2bf372c7e3c32b6d9754d9d8
      [artifact_test] $ /bin/sh -xe /tmp/hudson29151.sh
      + echo Before artifact copy task...
      Before artifact copy task...
      Build was aborted
      Archiving artifacts
      ERROR: Publisher hudson.tasks.ArtifactArchiver aborted due to exception
      java.lang.InterruptedException
      	at java.lang.Object.wait(Native Method)
      	at hudson.remoting.Request.call(Request.java:122)
      	at hudson.remoting.Channel.call(Channel.java:551)
      	at hudson.EnvVars.getRemote(EnvVars.java:196)
      	at hudson.model.Computer.getEnvironment(Computer.java:728)
      	at hudson.model.Run.getEnvironment(Run.java:1627)
      	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:663)
      	at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:550)
      	at hudson.model.Build$RunnerImpl.post2(Build.java:152)
      	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528)
      	at hudson.model.Run.run(Run.java:1247)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:122)
      Recording fingerprints
      ERROR: Publisher hudson.tasks.Fingerprinter aborted due to exception
      java.lang.InterruptedException
      	at java.lang.Object.wait(Native Method)
      	at hudson.remoting.Request.call(Request.java:122)
      	at hudson.remoting.Channel.call(Channel.java:551)
      	at hudson.FilePath.act(FilePath.java:736)
      	at hudson.FilePath.act(FilePath.java:729)
      	at hudson.tasks.Fingerprinter.record(Fingerprinter.java:163)
      	at hudson.tasks.Fingerprinter.perform(Fingerprinter.java:114)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:550)
      	at hudson.model.Build$RunnerImpl.post2(Build.java:152)
      	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528)
      	at hudson.model.Run.run(Run.java:1247)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:122)
      Finished: ABORTED
      

      Let me know if there's any other info I can provide.

        Attachments

          Activity

            People

            • Assignee:
              mindless Alan Harder
              Reporter:
              orrc Christopher Orr
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: