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

archiving artefacts from remote MacOS X, IBM AIX slave fails

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Blocker Blocker
    • core
    • Jenkins 1.461 + 1.472 +1.466.2
      Master node: Debian Linux, Tomcat 7
      Slave node: MacOS X 10.6
      Slave node: IBM AIX 5.3, AIX 6.1

      Archiving the artefacts from a slave fails with the following exception. It looks like it didn't find a suitable POSIX implementation.

      Oddly enough this just started happening seemingly without provocation. I'm pretty sure this installation worked correctly earlier today.

      ERROR: Failed to archive artifacts: build/*.zip, build/*.ipa, build/*.plist
      hudson.util.IOException2: java.lang.UnsupportedOperationException
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:1745)
      	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:705)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:680)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:658)
      	at hudson.model.Build$RunnerImpl.post2(Build.java:162)
      	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:627)
      	at hudson.model.Run.run(Run.java:1459)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:239)
      Caused by: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
      	at hudson.remoting.Channel$3.adapt(Channel.java:679)
      	at hudson.remoting.Channel$3.adapt(Channel.java:674)
      	at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:1743)
      	... 11 more
      Caused by: java.lang.UnsupportedOperationException
      	at hudson.os.PosixAPI$1.getCurrentWorkingDirectory(PosixAPI.java:59)
      	at org.jruby.ext.posix.util.ExecIt.run(ExecIt.java:59)
      	at org.jruby.ext.posix.util.ExecIt.runAndWait(ExecIt.java:51)
      	at org.jruby.ext.posix.JavaLibCHelper.readlink(JavaLibCHelper.java:196)
      	at org.jruby.ext.posix.JavaPOSIX.readlink(JavaPOSIX.java:160)
      	at hudson.Util.resolveSymlink(Util.java:1067)
      	at hudson.Util.resolveSymlink(Util.java:1030)
      	at hudson.util.DirScanner$Glob.scan(DirScanner.java:107)
      	at hudson.FilePath.writeToTar(FilePath.java:1781)
      	at hudson.FilePath.access$1000(FilePath.java:166)
      	at hudson.FilePath$36.invoke(FilePath.java:1722)
      	at hudson.FilePath$36.invoke(FilePath.java:1719)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2154)
      	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 hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	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 hudson.remoting.Engine$1$1.run(Engine.java:60)
      	at java.lang.Thread.run(Thread.java:680)
      

          [JENKINS-13614] archiving artefacts from remote MacOS X, IBM AIX slave fails

          Jesse Glick added a comment -

          @bdellegrazie, @nickolay_martinov: if you are looking for something simple and relatively safe to backport to LTS you probably want: https://github.com/jenkinsci/jenkins/commit/f50316b66a8e4761193c46f824fbd620ffccd6c0

          Jesse Glick added a comment - @bdellegrazie, @nickolay_martinov: if you are looking for something simple and relatively safe to backport to LTS you probably want: https://github.com/jenkinsci/jenkins/commit/f50316b66a8e4761193c46f824fbd620ffccd6c0

          This will throw exception for every file. Alternative approach is to check if file is a symlink before trying to resolve it. This works better and seems more logical. See attached patch.

          Nikolay Martynov added a comment - This will throw exception for every file. Alternative approach is to check if file is a symlink before trying to resolve it. This works better and seems more logical. See attached patch.

          Jesse Glick added a comment -

          @nickolay_martinov: your patch will still throw the error when the file is detected as a symlink but cannot be read for some reason, which may be a problem. Also for a proper implementation of resolveSymlink (such as now in trunk when using Java 7) it is more efficient to just call this method and check for null then to first call isSymlink. That said, either patch would probably suffice as a hotfix for LTS.

          Jesse Glick added a comment - @nickolay_martinov: your patch will still throw the error when the file is detected as a symlink but cannot be read for some reason, which may be a problem. Also for a proper implementation of resolveSymlink (such as now in trunk when using Java 7) it is more efficient to just call this method and check for null then to first call isSymlink . That said, either patch would probably suffice as a hotfix for LTS.

          WH added a comment -

          Is it possible to get LTS 1466.2 applied with the mentioned patches soon?

          WH added a comment - Is it possible to get LTS 1466.2 applied with the mentioned patches soon?

          Jesse Glick added a comment -

          Not sure if there is a standard label for LTS backport proposals…?

          Jesse Glick added a comment - Not sure if there is a standard label for LTS backport proposals…?

          Still can't archive artifacts on ia64 slave.
          Now the jobs just hangs on 'Archiving artifacts' step. But now there's no any exceptions in the logs...
          Using v1.487

          Natalia Naumova added a comment - Still can't archive artifacts on ia64 slave. Now the jobs just hangs on 'Archiving artifacts' step. But now there's no any exceptions in the logs... Using v1.487

          Hello Natalia, could you please clarify if new version still fails with Java 6 or with Java 7?

          Nikolay Martynov added a comment - Hello Natalia, could you please clarify if new version still fails with Java 6 or with Java 7?

          Natalia Naumova added a comment - - edited

          Nickolay, I tried with Java 6 (openjdk).
          The same behavior is for 1.487, 1.483 also.

          Natalia Naumova added a comment - - edited Nickolay, I tried with Java 6 (openjdk). The same behavior is for 1.487, 1.483 also.

          WH added a comment -

          With 1.486 I have no problems anymore. The exception "UnsupportedOperationException" is gone.

          Master: Windows XP, JDK6 (Oracle)
          Slave1: AIX 5.3, Java6 64-bit SDK (IBM)
          Slave2: AIX 6.1, Java6 64-bit SDK (IBM)

          I'm still waiting for the next LTS release which includes the fixes.

          BTW: Now I have a problem with the Copy Artifact Plugin, which sometimes doesn't copy artifacts of some configuration builds of a matrix job.

          WH added a comment - With 1.486 I have no problems anymore. The exception "UnsupportedOperationException" is gone. Master: Windows XP, JDK6 (Oracle) Slave1: AIX 5.3, Java6 64-bit SDK (IBM) Slave2: AIX 6.1, Java6 64-bit SDK (IBM) I'm still waiting for the next LTS release which includes the fixes. BTW: Now I have a problem with the Copy Artifact Plugin, which sometimes doesn't copy artifacts of some configuration builds of a matrix job.

          Jesse Glick added a comment -

          I think this is just a duplicate of JENKINS-13202.

          Jesse Glick added a comment - I think this is just a duplicate of JENKINS-13202 .

            Unassigned Unassigned
            mbetter Marcus Better
            Votes:
            15 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved: