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

Job fails as JiraSCMListsener/JiraSite potentially creating Executor with 0 threads

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      After the release of v1.9.0 for Blue Ocean Plugins, invoking a Multibranch Pipeline job from Stash using the URL for "Scan Multibranch Pipeline Now" causes a build to fail on SCM checkout. The failure is from JiraSCMListener:

      java.lang.IllegalArgumentException
      	at java.util.concurrent.ThreadPoolExecutor.<init>(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.<init>(Unknown Source)
      	at java.util.concurrent.Executors.newFixedThreadPool(Unknown Source)
      	at hudson.plugins.jira.JiraSite.createSession(JiraSite.java:457)
      	at hudson.plugins.jira.JiraSite.getSession(JiraSite.java:426)
      	at io.jenkins.blueocean.service.embedded.jira.JiraSCMListener.onChangeLogParsed(JiraSCMListener.java:45)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:1050)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1400(WorkflowRun.java:143)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1253)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:136)
      	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:144)
      	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:67)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:303)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      

      This seems to have occurred after the release of JENKINS-53320, potentially from this commit in JiraSite.java.

      From what I can see, the threadExecutorNumber is be supplied to the Executor as 0. This does look highly possible, as there are quite a lot of places that directly set the "this.threadExecutorNumber" without using the DEFAULT value to protect against 0s. There is a new "setThreadExecutorNumber" method within that commit, so the protection could be in there, and everything uses that to set the variable instead of directly.

      Reverting back to the previous Plugins version, or disabling Jira in Jenkins stops the error from occurring. Also, going to the branch that failed for the above and clicking "Build Now" succeeds - it only seems to be for existing branches after the update, and only when invoked using "Scan Now".

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                olamy Olivier Lamy
                Reporter:
                badgerati Matthew Kelly
              • Votes:
                7 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: