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

hard killing a pipeline leaves the JVM CPS thread running.

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: workflow-cps-plugin
    • Labels:
      None
    • Environment:
      pipeline 1.13
      jenkins 1.642.1
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            teilo James Nord created issue -
            teilo James Nord made changes -
            Field Original Value New Value
            Link This issue is blocking JENKINS-25550 [ JENKINS-25550 ]
            teilo James Nord made changes -
            Description 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.
            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.
            jglick Jesse Glick made changes -
            Description 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.
            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.
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 168715 ] JNJira + In-Review [ 183239 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-25623 [ JENKINS-25623 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-37719 [ JENKINS-37719 ]
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-30978 [ JENKINS-30978 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-31484 [ JENKINS-31484 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-32228 [ JENKINS-32228 ]
            jglick Jesse Glick made changes -
            Component/s workflow-cps-plugin [ 21713 ]
            Component/s pipeline [ 21692 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-support PR 29 (Web Link)" [ 15378 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-cps PR 102 (Web Link)" [ 15379 ]
            lucasam Lucas Machado made changes -
            Link This issue relates to JENKINS-42561 [ JENKINS-42561 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-43276 [ JENKINS-43276 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-44785 [ JENKINS-44785 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-support PR 37 (Web Link)" [ 17157 ]
            0x89 Martin Sander made changes -
            Link This issue is related to JENKINS-45772 [ JENKINS-45772 ]
            basil Basil Crow made changes -
            Link This issue relates to JENKINS-47006 [ JENKINS-47006 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-1488 (Web Link)" [ 18678 ]

              People

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

                Dates

                • Created:
                  Updated: