• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline
    • None
    • Jenkins 1.618
      Workflow 1.8

      While experimenting with Workflow, I called the equivalent of

      parallel [:]
      

      This appears to have never terminated.

      Specifically, "Execute sub-workflows in parallel : Start" has been running for 14 hours now, with no child steps.

          [JENKINS-29413] Parallel with an empty map will run forever

          Chris Hillery added a comment -

          FYI the workaround on JENKINS-25550 (appending /doDelete to the build URL) doesn't work either. It removes the build in that the URL for the build returns 404, but the "part of foo" build is still consuming an executor on the slave.

          Chris Hillery added a comment - FYI the workaround on JENKINS-25550 (appending /doDelete to the build URL) doesn't work either. It removes the build in that the URL for the build returns 404, but the "part of foo" build is still consuming an executor on the slave.

          Chris Hillery added a comment -

          Also FYI, even deleting the Workflow itself doesn't fix it. Executors still in use (although that at least cleared any queued runs).

          Chris Hillery added a comment - Also FYI, even deleting the Workflow itself doesn't fix it. Executors still in use (although that at least cleared any queued runs).

          Chris Hillery added a comment -

          Ahh... deleting the Workflow job, and then stopping and starting Jenkins finally did the trick. All executors free, and the phantom slave is gone.

          (FYI I initially tried to use the <jenkins>/restart URL to restart Jenkins, and the Java process went into a 100% CPU busyloop. But killing it and restarting Jenkins finally put things right.)

          This is still a pretty severe consequence of a trivial bug in a workflow script.

          Chris Hillery added a comment - Ahh... deleting the Workflow job, and then stopping and starting Jenkins finally did the trick. All executors free, and the phantom slave is gone. (FYI I initially tried to use the <jenkins>/restart URL to restart Jenkins, and the Java process went into a 100% CPU busyloop. But killing it and restarting Jenkins finally put things right.) This is still a pretty severe consequence of a trivial bug in a workflow script.

          Jesse Glick added a comment -

          You need to delete the build as mentioned in JENKINS-25550, then restart.

          Jesse Glick added a comment - You need to delete the build as mentioned in JENKINS-25550 , then restart.

          Chris Hillery added a comment -

          Good to know the work-around, but IMHO at least this is still a significant bug as the consequences are severe and the work-around is pretty hidden.

          Chris Hillery added a comment - Good to know the work-around, but IMHO at least this is still a significant bug as the consequences are severe and the work-around is pretty hidden.

          Jesse Glick added a comment -

          No argument there.

          Jesse Glick added a comment - No argument there.

          Jens Wilke added a comment -

          Although obvious for the Groovy hackers, the workaround is:

          def possiblyEmptyArray = ...
          if (possiblyEmptyArray) {
            parallel possiblyEmptyArray
          }
          

          Jens Wilke added a comment - Although obvious for the Groovy hackers, the workaround is: def possiblyEmptyArray = ... if (possiblyEmptyArray) { parallel possiblyEmptyArray }

          Code changed in jenkins
          User: Jesse Glick
          Path:
          CHANGES.md
          aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/parallel/ParallelStepTest.java
          cps/src/main/java/org/jenkinsci/plugins/workflow/cps/steps/ParallelStepExecution.java
          http://jenkins-ci.org/commit/workflow-plugin/1ecc56e967940fbc6047aa432d5d5e556670eca2
          Log:
          [FIXED JENKINS-29413]: hung build when running the parallel step with an empty map.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: CHANGES.md aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/parallel/ParallelStepTest.java cps/src/main/java/org/jenkinsci/plugins/workflow/cps/steps/ParallelStepExecution.java http://jenkins-ci.org/commit/workflow-plugin/1ecc56e967940fbc6047aa432d5d5e556670eca2 Log: [FIXED JENKINS-29413] : hung build when running the parallel step with an empty map.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          CHANGES.md
          aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/parallel/ParallelStepTest.java
          cps/src/main/java/org/jenkinsci/plugins/workflow/cps/steps/ParallelStepExecution.java
          http://jenkins-ci.org/commit/workflow-plugin/85330f60060d84c9d4d5b05a2062e9fc97063a74
          Log:
          Merge pull request #265 from jglick/parallel-JENKINS-29413

          JENKINS-29413 Hung build when running the parallel step with an empty map

          Compare: https://github.com/jenkinsci/workflow-plugin/compare/be558db587b9...85330f60060d

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: CHANGES.md aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/parallel/ParallelStepTest.java cps/src/main/java/org/jenkinsci/plugins/workflow/cps/steps/ParallelStepExecution.java http://jenkins-ci.org/commit/workflow-plugin/85330f60060d84c9d4d5b05a2062e9fc97063a74 Log: Merge pull request #265 from jglick/parallel- JENKINS-29413 JENKINS-29413 Hung build when running the parallel step with an empty map Compare: https://github.com/jenkinsci/workflow-plugin/compare/be558db587b9...85330f60060d

          Code changed in jenkins
          User: Jesse Glick
          Path:
          aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/parallel/ParallelStepTest.java
          cps/src/main/java/org/jenkinsci/plugins/workflow/cps/steps/ParallelStepExecution.java
          http://jenkins-ci.org/commit/workflow-cps-plugin/bd606c258e887f8b7f9fa4bab9de0d008541d524
          Log:
          [FIXED JENKINS-29413]: hung build when running the parallel step with an empty map.
          Originally-Committed-As: 1ecc56e967940fbc6047aa432d5d5e556670eca2

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/parallel/ParallelStepTest.java cps/src/main/java/org/jenkinsci/plugins/workflow/cps/steps/ParallelStepExecution.java http://jenkins-ci.org/commit/workflow-cps-plugin/bd606c258e887f8b7f9fa4bab9de0d008541d524 Log: [FIXED JENKINS-29413] : hung build when running the parallel step with an empty map. Originally-Committed-As: 1ecc56e967940fbc6047aa432d5d5e556670eca2

            jglick Jesse Glick
            p_hampson Paul "TBBle" Hampson
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: