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

timer expires, and build is halted, but build is not marked as failed

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • build-timeout-plugin
    • None
    • Debian Lenny, Jenkins ver. 1.404 and build-timeout ver. 1.7

      I just installed the build-timeout plugin and it's mostly working, but
      even with the "Fail the build" setting checked, my builds are still
      being marked as "aborted":

      For example, here is the tail of the console output:
      {{
      [...]
      Build timed out (after 3 minutes). Marking the build as failed.
      Terminated
      +++ vncserver -kill beast:3 -clean
      Killing Xtightvnc process ID 12328
      +++ exit
      Finished: ABORTED
      }}

      Note that it says it will fail the build, but then it is aborted and
      the status of the build is set to aborted, not failed. Bonus pain:
      Of course no email goes out.

      This is with Jenkins ver. 1.404 and build-timeout ver. 1.7.

          [JENKINS-9203] timer expires, and build is halted, but build is not marked as failed

          Code changed in jenkins
          User: redsolo
          Path:
          src/test/java/hudson/plugins/build_timeout/BuildTimeoutWrapperIntegrationTest.java
          src/test/resources/hudson/plugins/build_timeout/BuildTimeoutWrapperIntegrationTest/testIssue9203.zip
          http://jenkins-ci.org/commit/build-timeout-plugin/7485913f4faea9d8a0b1344662f58632be86c313
          Log:
          JENKINS-9203 Added integration test case that fails under 1.398 but not under 1.397

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: redsolo Path: src/test/java/hudson/plugins/build_timeout/BuildTimeoutWrapperIntegrationTest.java src/test/resources/hudson/plugins/build_timeout/BuildTimeoutWrapperIntegrationTest/testIssue9203.zip http://jenkins-ci.org/commit/build-timeout-plugin/7485913f4faea9d8a0b1344662f58632be86c313 Log: JENKINS-9203 Added integration test case that fails under 1.398 but not under 1.397

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          pom.xml
          src/main/java/hudson/plugins/build_timeout/BuildTimeoutWrapper.java
          http://jenkins-ci.org/commit/build-timeout-plugin/36c0385367fce3645b6782e4228315e35bfdefdd
          Log:
          [FIXED JENKINS-9203] mark the build as failure by using the new API

          Compare: https://github.com/jenkinsci/build-timeout-plugin/compare/a065565...36c0385

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: pom.xml src/main/java/hudson/plugins/build_timeout/BuildTimeoutWrapper.java http://jenkins-ci.org/commit/build-timeout-plugin/36c0385367fce3645b6782e4228315e35bfdefdd Log: [FIXED JENKINS-9203] mark the build as failure by using the new API Compare: https://github.com/jenkinsci/build-timeout-plugin/compare/a065565...36c0385

          dogfood added a comment -

          Integrated in plugins_build-timeout #16
          JENKINS-9203 Added integration test case that fails under 1.398 but not under 1.397
          [FIXED JENKINS-9203] mark the build as failure by using the new API

          redsolo :
          Files :

          • src/test/java/hudson/plugins/build_timeout/BuildTimeoutWrapperIntegrationTest.java
          • src/test/resources/hudson/plugins/build_timeout/BuildTimeoutWrapperIntegrationTest/testIssue9203.zip

          Kohsuke Kawaguchi :
          Files :

          • pom.xml
          • src/main/java/hudson/plugins/build_timeout/BuildTimeoutWrapper.java

          dogfood added a comment - Integrated in plugins_build-timeout #16 JENKINS-9203 Added integration test case that fails under 1.398 but not under 1.397 [FIXED JENKINS-9203] mark the build as failure by using the new API redsolo : Files : src/test/java/hudson/plugins/build_timeout/BuildTimeoutWrapperIntegrationTest.java src/test/resources/hudson/plugins/build_timeout/BuildTimeoutWrapperIntegrationTest/testIssue9203.zip Kohsuke Kawaguchi : Files : pom.xml src/main/java/hudson/plugins/build_timeout/BuildTimeoutWrapper.java

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/matrix/MatrixBuild.java
          core/src/main/java/hudson/model/Build.java
          core/src/main/java/hudson/model/Executor.java
          core/src/main/java/hudson/model/Result.java
          core/src/main/java/hudson/model/Run.java
          maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
          maven-plugin/src/main/java/hudson/maven/MavenBuilder.java
          maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
          test/src/test/java/hudson/model/AbortedFreeStyleBuildTest.java
          http://jenkins-ci.org/commit/jenkins/a3354b12cfc5f554487b59f35e5a0bdbce8861a6
          Log:
          [FIXED JENKINS-9203] in light of 9c965617b3b385ef65eaf50860865c05a114a01d, I think the proper fix is to define a mechanism to abort with status.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/matrix/MatrixBuild.java core/src/main/java/hudson/model/Build.java core/src/main/java/hudson/model/Executor.java core/src/main/java/hudson/model/Result.java core/src/main/java/hudson/model/Run.java maven-plugin/src/main/java/hudson/maven/Maven3Builder.java maven-plugin/src/main/java/hudson/maven/MavenBuilder.java maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java test/src/test/java/hudson/model/AbortedFreeStyleBuildTest.java http://jenkins-ci.org/commit/jenkins/a3354b12cfc5f554487b59f35e5a0bdbce8861a6 Log: [FIXED JENKINS-9203] in light of 9c965617b3b385ef65eaf50860865c05a114a01d, I think the proper fix is to define a mechanism to abort with status.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/matrix/MatrixBuild.java
          core/src/main/java/hudson/model/Build.java
          core/src/main/java/hudson/model/Executor.java
          core/src/main/java/hudson/model/Result.java
          core/src/main/java/hudson/model/Run.java
          maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
          maven-plugin/src/main/java/hudson/maven/MavenBuilder.java
          maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
          test/src/test/java/hudson/model/AbortedFreeStyleBuildTest.java
          http://jenkins-ci.org/commit/jenkins/a3354b12cfc5f554487b59f35e5a0bdbce8861a6
          Log:
          [FIXED JENKINS-9203] in light of 9c965617b3b385ef65eaf50860865c05a114a01d, I think the proper fix is to define a mechanism to abort with status.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/matrix/MatrixBuild.java core/src/main/java/hudson/model/Build.java core/src/main/java/hudson/model/Executor.java core/src/main/java/hudson/model/Result.java core/src/main/java/hudson/model/Run.java maven-plugin/src/main/java/hudson/maven/Maven3Builder.java maven-plugin/src/main/java/hudson/maven/MavenBuilder.java maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java test/src/test/java/hudson/model/AbortedFreeStyleBuildTest.java http://jenkins-ci.org/commit/jenkins/a3354b12cfc5f554487b59f35e5a0bdbce8861a6 Log: [FIXED JENKINS-9203] in light of 9c965617b3b385ef65eaf50860865c05a114a01d, I think the proper fix is to define a mechanism to abort with status.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          core/src/main/java/hudson/matrix/MatrixBuild.java
          http://jenkins-ci.org/commit/matrix-project-plugin/7cab552d387727d1af3e5fa277ea4503bdc6242e
          Log:
          [FIXED JENKINS-9203] in light of 9c965617b3b385ef65eaf50860865c05a114a01d, I think the proper fix is to define a mechanism to abort with status.

          Originally-Committed-As: a3354b12cfc5f554487b59f35e5a0bdbce8861a6

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/matrix/MatrixBuild.java http://jenkins-ci.org/commit/matrix-project-plugin/7cab552d387727d1af3e5fa277ea4503bdc6242e Log: [FIXED JENKINS-9203] in light of 9c965617b3b385ef65eaf50860865c05a114a01d, I think the proper fix is to define a mechanism to abort with status. Originally-Committed-As: a3354b12cfc5f554487b59f35e5a0bdbce8861a6

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          src/main/java/hudson/maven/Maven3Builder.java
          src/main/java/hudson/maven/MavenBuilder.java
          src/main/java/hudson/maven/MavenModuleSetBuild.java
          http://jenkins-ci.org/commit/maven-plugin/a8a6efc5cab02b40c1af6f19c9b8f648f8713976
          Log:
          [FIXED JENKINS-9203] in light of 9c965617b3b385ef65eaf50860865c05a114a01d, I think the proper fix is to define a mechanism to abort with status.

          Originally-Committed-As: a3354b12cfc5f554487b59f35e5a0bdbce8861a6

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: src/main/java/hudson/maven/Maven3Builder.java src/main/java/hudson/maven/MavenBuilder.java src/main/java/hudson/maven/MavenModuleSetBuild.java http://jenkins-ci.org/commit/maven-plugin/a8a6efc5cab02b40c1af6f19c9b8f648f8713976 Log: [FIXED JENKINS-9203] in light of 9c965617b3b385ef65eaf50860865c05a114a01d, I think the proper fix is to define a mechanism to abort with status. Originally-Committed-As: a3354b12cfc5f554487b59f35e5a0bdbce8861a6

          I am using:
          Jenkins 1.580
          build timeout plugin 1.14

          I am trying to get the "fail the build" functionality to work, but instead the build is just getting aborted. Here is what I get at the end of the log file:

          Build timed out (after 3 minutes). Marking the build as failed.
          Build was aborted
          Finished: ABORTED

          I apologize if this is the wrong place to post, but it appears to be the same issue, perhaps coming back again.

          Colden Rouleau added a comment - I am using: Jenkins 1.580 build timeout plugin 1.14 I am trying to get the "fail the build" functionality to work, but instead the build is just getting aborted. Here is what I get at the end of the log file: Build timed out (after 3 minutes). Marking the build as failed. Build was aborted Finished: ABORTED I apologize if this is the wrong place to post, but it appears to be the same issue, perhaps coming back again.

          Daniel Beck added a comment -

          crouleau: Please file a new issue against the core component. Provide as much information as you can, and link back to this issue for reference. If possible, include full instructions how to reproduce the problem on a new Jenkins instance. See also https://wiki.jenkins-ci.org/display/JENKINS/How+to+report+an+issue (FWIW I cannot reproduce the issue on my test instance, so be extra specific)

          Daniel Beck added a comment - crouleau : Please file a new issue against the core component. Provide as much information as you can, and link back to this issue for reference. If possible, include full instructions how to reproduce the problem on a new Jenkins instance. See also https://wiki.jenkins-ci.org/display/JENKINS/How+to+report+an+issue (FWIW I cannot reproduce the issue on my test instance, so be extra specific)

          Hey, so I'm not 100% sure what happened, but right after I posted my last message I changed the build from a static timeout (which I was using for testing purposes) to use an elastic timeout strategy. 35 minutes later, I got a failure notification email. So clearly, the elastic timeout works fine. I'm not sure what happened there, but I suppose there's no issue as far as I'm concerned.

          This was what was at the end of the log:

          Build timed out (after 35 minutes). Marking the build as failed.
          Build was aborted
          Sending e-mails to: myemail@something.com
          Finished: FAILURE

          Colden Rouleau added a comment - Hey, so I'm not 100% sure what happened, but right after I posted my last message I changed the build from a static timeout (which I was using for testing purposes) to use an elastic timeout strategy. 35 minutes later, I got a failure notification email. So clearly, the elastic timeout works fine. I'm not sure what happened there, but I suppose there's no issue as far as I'm concerned. This was what was at the end of the log: Build timed out (after 35 minutes). Marking the build as failed. Build was aborted Sending e-mails to: myemail@something.com Finished: FAILURE

            kohsuke Kohsuke Kawaguchi
            eengstrom Eric Engstrom
            Votes:
            9 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: