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

timeout step should be able to kill infinite loop

    Details

    • Similar Issues:

      Description

      Timeout step is currently only able to interrupt executions that are pausing (such as the 'sh' step.)

      It would be nice if it can also interrupt infinite loops like while(true) ; by magically throwing an exception.

      To safely doing this without race seems to require that CpsThread.runNextChunk spontaneously return even without the CPS code explicitly yielding. When resuming, any abnormal Outcome should act as if it's throwing the exception, and normal Outcome should get ignored and its natural result should be used instead.

      The spontaneous return could happen every N instructions. Or CpsTransformer can insert Block that does it, like HotSpot inserts safepoint checks at the beginning of every function and every loop.

        Attachments

          Issue Links

            Activity

            kohsuke Kohsuke Kawaguchi created issue -
            rtyler R. Tyler Croy made changes -
            Field Original Value New Value
            Workflow JNJira [ 159597 ] JNJira + In-Review [ 180047 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-32986 [ JENKINS-32986 ]
            jglick Jesse Glick made changes -
            Epic Link JENKINS-35396 [ 171189 ]
            kohsuke Kohsuke Kawaguchi made changes -
            Remote Link This issue links to "PR #46 (Web Link)" [ 14746 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            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 -
            Component/s workflow-cps-plugin [ 21713 ]
            Component/s pipeline [ 21692 ]
            jglick Jesse Glick made changes -
            Labels robustness
            jglick Jesse Glick made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-38157 [ JENKINS-38157 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-32228 [ JENKINS-32228 ]

              People

              • Assignee:
                kohsuke Kohsuke Kawaguchi
                Reporter:
                kohsuke Kohsuke Kawaguchi
              • Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: