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

timeout step should be able to kill infinite loop

    XMLWordPrintable

    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

              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: