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

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


    • Similar Issues:


      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:

      	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".


          Issue Links


            badgerati Matthew Kelly created issue -
            olamy Olivier Lamy made changes -
            Field Original Value New Value
            Assignee Olivier Lamy [ olamy ]
            olamy Olivier Lamy made changes -
            Labels jira-plugin-3.0.4
            olamy Olivier Lamy made changes -
            Component/s jira-plugin [ 15515 ]
            Component/s blueocean-plugin [ 21481 ]
            olamy Olivier Lamy made changes -
            Component/s blueocean-plugin [ 21481 ]
            leo_ Leo Leung made changes -
            Link This issue is related to JENKINS-54131 [ JENKINS-54131 ]
            olamy Olivier Lamy made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]


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


                • Created: