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

jenkins-multijob-plugin - Multijob plugin throws exception when trying to get cancelled job

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core, multijob-plugin
    • CentOS 6.0, Jenkins ver 1.461

      java version "1.6.0_22"
      OpenJDK Runtime Environment (IcedTea6 1.10.6) (rhel-1.43.1.10.6.el6_2-x86_64)
      OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

      FYI- jenkins-multijob-plugin is not a vaild component, or else I would have filed this there. Feel free to move or change component.

      Sometimes, when the jenkins multijob plugin is dispatching jobs, one will fail. If this happens, it will cancel jobs in the future loop. The loop is at MultiJobBuilder.java:92. If a job is canceled, calling future.get() on it will cause a cancellation exception.

      A good way to try and reproduce this is to create multiple jobs, including one which will auto-fail, and one which will wait for a while. An easy way to do this is to make two "Execute Shell" jobs:
      Job which auto-fails: "ls /not/a/real/directory"
      Job which waits: "sleep 20"

      Backtrace:

      FATAL: null
      java.util.concurrent.CancellationException
      at hudson.remoting.AsyncFutureImpl.get(AsyncFutureImpl.java:77)
      at com.tikal.jenkins.plugins.multijob.MultiJobBuilder.perform(MultiJobBuilder.java:102)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:705)
      at hudson.model.Build$RunnerImpl.build(Build.java:178)
      at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:475)
      at hudson.model.Run.run(Run.java:1434)
      at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:45)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:239)

          [JENKINS-13598] jenkins-multijob-plugin - Multijob plugin throws exception when trying to get cancelled job

          Danny Lesnik added a comment -

          I was not able to reproduce this issue I created one multiple job with 2 execute shell jobs:

          Job which auto-fails: "ls /not/a/real/directory"
          Job which waits: "sleep 120"

          when the first problem fails in the loop MultiJobBuilder.java(96)
          future.get() return result with status FAILED, Boolean failed becomes true and all other futures (jobs) are canceled without any error.

          Regards,
          Danny Lesnik.

          Danny Lesnik added a comment - I was not able to reproduce this issue I created one multiple job with 2 execute shell jobs: Job which auto-fails: "ls /not/a/real/directory" Job which waits: "sleep 120" when the first problem fails in the loop MultiJobBuilder.java(96) future.get() return result with status FAILED, Boolean failed becomes true and all other futures (jobs) are canceled without any error. Regards, Danny Lesnik.

          Im seeing this issue in my jenkins environment now. Im running Jenkins ver. 1.497 Jenkins Multijob plugin ver. 1.7.

          Tomas Eriksson added a comment - Im seeing this issue in my jenkins environment now. Im running Jenkins ver. 1.497 Jenkins Multijob plugin ver. 1.7.

          Tomas Eriksson added a comment - - edited

          This issue exists

          Tomas Eriksson added a comment - - edited This issue exists

          Can't reproduce the issue but improved the canceled future evaluation.

          Alex Nickolaevsky added a comment - Can't reproduce the issue but improved the canceled future evaluation.

          Alex Nickolaevsky added a comment - - edited

          Tested on java version "1.6.0_22"
          OpenJDK Runtime Environment (IcedTea6 1.10.6)

          Alex Nickolaevsky added a comment - - edited Tested on java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.6)

          Russell B added a comment -

          I just ran into the same issue with Multijob. I won't bother re-opening the issue because I do not know how to reproduce this. One detail that may be relevant is that there are several jobs being triggered by the plugin that are disabled. Unlike Nate's description, none of the triggered jobs failed.

          FATAL: null
          java.util.concurrent.CancellationException
          at hudson.remoting.AsyncFutureImpl.get(AsyncFutureImpl.java:77)
          at com.tikal.jenkins.plugins.multijob.MultiJobBuilder.perform(MultiJobBuilder.java:106)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
          at hudson.model.Build$BuildExecution.build(Build.java:199)
          at hudson.model.Build$BuildExecution.doRun(Build.java:160)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
          at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:67)
          at hudson.model.Run.execute(Run.java:1597)
          at hudson.model.Run.run(Run.java:1543)
          at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:60)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:247)

          Russell B added a comment - I just ran into the same issue with Multijob. I won't bother re-opening the issue because I do not know how to reproduce this. One detail that may be relevant is that there are several jobs being triggered by the plugin that are disabled. Unlike Nate's description, none of the triggered jobs failed. FATAL: null java.util.concurrent.CancellationException at hudson.remoting.AsyncFutureImpl.get(AsyncFutureImpl.java:77) at com.tikal.jenkins.plugins.multijob.MultiJobBuilder.perform(MultiJobBuilder.java:106) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586) at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:67) at hudson.model.Run.execute(Run.java:1597) at hudson.model.Run.run(Run.java:1543) at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:60) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247)

          Russell B added a comment -

          I found another way to reproduce this error: disable one of the downstream jobs after starting the multijob, but before the downstream job has been started.

          Russell B added a comment - I found another way to reproduce this error: disable one of the downstream jobs after starting the multijob, but before the downstream job has been started.

            alex_nick Alex Nickolaevsky
            nseay Nate Seay
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: