Issue Type: Bug Bug
Assignee: Jesse Glick
Components: workflow-plugin
Created: 16/Apr/15 6:28 AM
Description:

Hi,

The following workflow will just hang forever:

node {
  parallel([:])
}

Log:

Started by user anonymous
Running: Allocate node : Start
Running on master in /home/ehencae/src/workflow-plugin/aggregator/work/jobs/test1/workspace@2
Running: Allocate node : Body : Start
Running: Execute sub-workflows in parallel : Start
Aborted by anonymous
Aborted by anonymous
Aborted by anonymous
Resuming build

After that it is not possible to abort it, not even by restart. The workaround in JENKINS-25550 did the trick. Parallel should not just hang when executed with a empty map. Even though it's easy to workaround in the flow so that it isn't called for empty maps.

Possible to recreate in:

org.jenkinsci.plugins.workflow.steps.parallel.ParallelStepTest
@Test
    public void parallelEmptyMap() {
        story.addStep(new Statement() {
            @Override public void evaluate() throws Throwable {
                p = jenkins().createProject(WorkflowJob.class, "demo");
                p.setDefinition(new CpsFlowDefinition(join(
                        "node {\n" +
                                "    parallel([:])\n" +
                                "}\n"
                )));

                startBuilding().get();
                assertBuildCompletedSuccessfully();
            }
        });
    }

Log:

...
=== Starting parallelEmptyMap(org.jenkinsci.plugins.workflow.steps.parallel.ParallelStepTest)
[demo #1] Started
[demo #1] Running: Allocate node : Start
[demo #1] Running on master in /tmp/junit1594929993299071723/junit5524096835654718071/workspace/demo
[demo #1] Running: Allocate node : Body : Start
[demo #1] Running: Execute sub-workflows in parallel : Start
Project: Jenkins
Priority: Minor Minor
Reporter: Henrik Caesar
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to