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

hard killing a pipeline leaves the JVM CPS thread running.

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

          [JENKINS-32986] hard killing a pipeline leaves the JVM CPS thread running.

          James Nord created issue -
          James Nord made changes -
          Link New: This issue is blocking JENKINS-25550 [ JENKINS-25550 ]
          James Nord made changes -
          Description Original: In the event a workflow won;t 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 workflow
          {{noformat}}
          def spin() {
              while (true) {}
          }

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

          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.
          New: In the event a workflow won;t 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 workflow
          {noformat}
          def spin() {
              while (true) {}
          }

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

          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.
          Jesse Glick made changes -
          Description Original: In the event a workflow won;t 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 workflow
          {noformat}
          def spin() {
              while (true) {}
          }

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

          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.
          New: 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

          {code}
          def spin() {
              while (true) {}
          }

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

          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.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 168715 ] New: JNJira + In-Review [ 183239 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-25623 [ JENKINS-25623 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-37719 [ JENKINS-37719 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-30978 [ JENKINS-30978 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-31484 [ JENKINS-31484 ]

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

              Created:
              Updated: