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

          Nate Seay created issue -
          Arnaud Héritier made changes -
          Component/s New: jenkins-multijob-plugin [ 16545 ]
          hagzag made changes -
          Assignee New: Danny Lesnik [ dannylesnik ]

          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.
          hagzag made changes -
          Fix Version/s New: current [ 10162 ]
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          hagzag made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

          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
          Tomas Eriksson made changes -
          Resolution Original: Cannot Reproduce [ 5 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]
          hagzag made changes -
          Assignee Original: Danny Lesnik [ dannylesnik ] New: Alex Nickolaevsky [ alex_nick ]

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

              Created:
              Updated:
              Resolved: