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

Referencing non-existant variable in Pipeline causes CPU to spike and job to hang

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • workflow-cps-plugin
    • None
    • 1.651.3.1, Pipeline 2.4

      Steps to reproduce:

      1. Create a new pipeline job with code similar to

      ```
      #!groovy

      def myVar

      node {
      myVar = getMyVar()
      echo "myVar is ${myVar}"
      echo "Loaded pipeline script."
      }

      def getMyVar() {
      myVar ? myVar : my_var
      }
      ```

      2. Observe CPU spike, and that job cannot be terminated

      See overflow.txt for exception in CPS.

            Unassigned Unassigned
            afein_cb Aaron Fein
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: