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

hard killing a pipeline leaves the JVM CPS thread running.

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • workflow-cps-plugin
    • None
    • pipeline 1.13
      jenkins 1.642.1

      In the event a pipeline build will not die you can hard kill it - however hard killing it will leave the JVMs CPS thread still running on the master.

      e.g. with the script

      def spin() {
          while (true) {}
      }
      
      def map = [:]
      map ["spin_it"] = { spin() } 
      }
      parallel map
      

      you will need to hard kill it to stop it (on windows at least) - but inspecting the JVM threads you can see the CPS thread is still running in a tight loop.
      A hard kill should probably (if it is safe without causing deadlocks elsewhere) brutally kill the thread as well. After a while you may run out of handles or other native resources due to the thread usage, meaning you need to restart Jenkins to get it working again.

            jglick Jesse Glick
            teilo James Nord
            Votes:
            4 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated: