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

Update ambiguous ABORTED message to "TIMED OUT" and fix raised InterruptedException

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • build-timeout-plugin
    • None
    • Windows Server 2003 SP2

      After the build times out the final message is "Finished: ABORTED". If there was still a lot of data on the Standard Out stream, then the time out message gets lost in the gobs of text so that it reads:

      <TEXT>
      Build timed out (after 3 minutes). Marked the build as aborted.
      <TONS OF TEXT>
      Build was aborted
      Finished: ABORTED

      In this event, it is not obvious to the users why the build was aborted since the "timed out" message is lost in the remaining standard out text. To add the confusion, if the user views the Jenkins error log to try to determine the cause for the abort, there is an "InterruptedException" that is raised that makes it appear as though Jenkins aborted the build due to an unexpected occurrence. Modifying the Finished message to say something like "Finished: TIMED OUT" would make it very clear to any user why the build stopped regardless of where the other time out message is displayed.
      Also the exception in the Jenkins error log should be caught if it is an expected error, so that users are not left thinking Jenkins failed unexpectedly.

      Errr log:
      INFO: TEST #1 aborted
      java.lang.InterruptedException
      at java.lang.ProcessImpl.waitFor(Native Method)
      at hudson.Proc$LocalProc.join(Proc.java:319)
      at hudson.Launcher$ProcStarter.join(Launcher.java:336)
      at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:82)
      at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
      at hudson.model.Build$RunnerImpl.build(Build.java:178)
      at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:459)
      at hudson.model.Run.run(Run.java:1376)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:230)

          [JENKINS-11064] Update ambiguous ABORTED message to "TIMED OUT" and fix raised InterruptedException

          pixman20 created issue -
          pixman20 made changes -
          Description Original: After the build times out the final message is "Finished: Aborted". This leads to confusion as to why the build was actually aborted. After viewing the Jenkins error log it has a "InterruptException" in it at the time the build was aborted, which makes it look like an unexpected error occurred. If possible, the final build message should have some indication that it was aborted to the build timing out. Even adding a the ability to supply a custom message could be nice, though simply "Finished: Timed Out" seems good enough to me.

          Also, there should not be an exception in the Jenkins error log for expected behavior, this should also be resolved as it is misleading as to the actual cause for the abort.
          New: After the build times out the final message is "Finished: Aborted". This leads to confusion as to why the build was actually aborted. After viewing the Jenkins error log it has a "InterruptException" in it at the time the build was aborted, which makes it look like an unexpected error occurred. If possible, the final build message should have some indication that it was aborted to the build timing out. Even adding a the ability to supply a custom message could be nice, though simply "Finished: Timed Out" seems good enough to me.

          Also, there should not be an exception in the Jenkins error log for expected behavior, this should also be resolved as it is misleading as to the actual cause for the abort.

          UPDATE:
          I ran a small job to test this out and I see that above "Finished: Aborted" it read "Build timed out (after 3 minutes). Marking the build as aborted.
          This message did NOT occur in my long 10 hour build. It was aborted with simply my log followed by "Finished: Aborted". I will attempt to reproduce the issue.

          The Exception however is still being raised even in the 3 minute small test:
          INFO: TEST #1 aborted
          java.lang.InterruptedException
          at java.lang.ProcessImpl.waitFor(Native Method)
          at hudson.Proc$LocalProc.join(Proc.java:319)
          at hudson.Launcher$ProcStarter.join(Launcher.java:336)
          at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:82)
          at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
          at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
          at hudson.model.Build$RunnerImpl.build(Build.java:178)
          at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:459)
          at hudson.model.Run.run(Run.java:1376)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:230)
          pixman20 made changes -
          Summary Original: Update Finished message from "Finished: Aborted" to "Finished: Timed Out" or custom New: Update Finished to "Timed Out" and fix raised InterupptedException
          pixman20 made changes -
          Summary Original: Update Finished to "Timed Out" and fix raised InterupptedException New: Update Finished to "Timed Out" and fix raised InterruptedException
          pixman20 made changes -
          Summary Original: Update Finished to "Timed Out" and fix raised InterruptedException New: Update ambiguous ABORTED message to "TIMED OUT" and fix raised InterruptedException
          pixman20 made changes -
          Description Original: After the build times out the final message is "Finished: Aborted". This leads to confusion as to why the build was actually aborted. After viewing the Jenkins error log it has a "InterruptException" in it at the time the build was aborted, which makes it look like an unexpected error occurred. If possible, the final build message should have some indication that it was aborted to the build timing out. Even adding a the ability to supply a custom message could be nice, though simply "Finished: Timed Out" seems good enough to me.

          Also, there should not be an exception in the Jenkins error log for expected behavior, this should also be resolved as it is misleading as to the actual cause for the abort.

          UPDATE:
          I ran a small job to test this out and I see that above "Finished: Aborted" it read "Build timed out (after 3 minutes). Marking the build as aborted.
          This message did NOT occur in my long 10 hour build. It was aborted with simply my log followed by "Finished: Aborted". I will attempt to reproduce the issue.

          The Exception however is still being raised even in the 3 minute small test:
          INFO: TEST #1 aborted
          java.lang.InterruptedException
          at java.lang.ProcessImpl.waitFor(Native Method)
          at hudson.Proc$LocalProc.join(Proc.java:319)
          at hudson.Launcher$ProcStarter.join(Launcher.java:336)
          at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:82)
          at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
          at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
          at hudson.model.Build$RunnerImpl.build(Build.java:178)
          at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:459)
          at hudson.model.Run.run(Run.java:1376)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:230)
          New: After the build times out the final message is "Finished: ABORTED". If there was still a lot of data on the Standard Out stream, then the time out message gets lost in the gobs of text so that it reads:

          <TEXT>
          Build timed out (after 3 minutes). Marked the build as aborted.
          <TONS OF TEXT>
          Build was aborted
          Finished: ABORTED

          In this event, it is not obvious to the users why the build was aborted since the "timed out" message is lost in the remaining standard out text. To add the confusion, if the user views the Jenkins error log to try to determine the cause for the abort, there is an "InterruptedException" that is raised that makes it appear as though Jenkins aborted the build due to an unexpected occurrence. Modifying the Finished message to say something like "Finished: TIMED OUT" would make it very clear to any user why the build stopped regardless of where the other time out message is displayed.
          Also the exception in the Jenkins error log should be caught if it is an expected error, so that users are not left thinking Jenkins failed unexpectedly.

          Errr log:
          INFO: TEST #1 aborted
          java.lang.InterruptedException
          at java.lang.ProcessImpl.waitFor(Native Method)
          at hudson.Proc$LocalProc.join(Proc.java:319)
          at hudson.Launcher$ProcStarter.join(Launcher.java:336)
          at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:82)
          at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
          at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
          at hudson.model.Build$RunnerImpl.build(Build.java:178)
          at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:459)
          at hudson.model.Run.run(Run.java:1376)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:230)
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 141274 ] New: JNJira + In-Review [ 175448 ]

            kohsuke Kohsuke Kawaguchi
            pixman20 pixman20
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: