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

"Likely stuck" timed out the build after 0 minutes

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • build-timeout-plugin
    • None

      The job was set to:

      • Abort the build if it's stuck
      • Likely stuck

      09:49:36 Started by user anonymous
      09:49:36 [EnvInject] - Loading node environment variables.
      09:49:36 Building remotely on slave-02 in workspace /home/jenkins/jenkins-slave/workspace/static_data_client_functions.checkin
      09:49:36 Checking out a fresh workspace because there's no workspace at /home/jenkins/jenkins-slave/workspace/static_data_client_functions.checkin
      09:49:36 Cleaning local Directory .
      09:49:36 Checking out svn://host.../path/.../trunk at revision '2014-01-29T09:49:36.068 +0000'
      09:49:37 A src
      09:49:37 A src/test
      09:49:37 A src/test/java
      ....... etc ...
      09:49:38 A src/main/resources
      09:49:38 A pom.xml
      09:49:38 U .
      09:49:38 At revision 984
      09:49:38 no revision recorded for svn://host.../path.../trunk in the previous build
      09:49:38 [static_data_client_functions.checkin] $ /home/jenkins/tools/maven/bin/mvn clean install --update-snapshots --batch-mode
      09:49:40 Build timed out (after 0 minutes). Marking the build as aborted.
      09:49:40 Build was aborted
      09:49:40 Build Aborted. Not looking for any TestNG results.
      09:49:40 Finished: ABORTED

          [JENKINS-21543] "Likely stuck" timed out the build after 0 minutes

          ikedam added a comment -

          I cannot get what's a problem.
          It looks work correct.

          ikedam added a comment - I cannot get what's a problem. It looks work correct.

          Ed Randall added a comment - - edited

          What is it that works correct?
          Our environment is given up the top of this JIRA,

          Expected behaviour is that Jenkins uses some heuristic to detect that a build is "likely stuck.
          But when we use this option it just aborts immediately, as shown.

          A build can't possibly be stuck after 0 minutes.
          We occasionally get builds that are genuinely stuck, we notice this after maybe 3 hours or more.
          It would be useful if this feature worked so we could use it to abort those.
          If the feature aborts every build after 0 minutes it's not much use though.

          Ed Randall added a comment - - edited What is it that works correct? Our environment is given up the top of this JIRA, Expected behaviour is that Jenkins uses some heuristic to detect that a build is "likely stuck. But when we use this option it just aborts immediately, as shown. A build can't possibly be stuck after 0 minutes. We occasionally get builds that are genuinely stuck, we notice this after maybe 3 hours or more. It would be useful if this feature worked so we could use it to abort those. If the feature aborts every build after 0 minutes it's not much use though.

          Ninian added a comment -

          In fact from the timestamps it looks like the build was aborted after 4 seconds. Surely the 'isLikelyStuck' heuristic should never conclude that a build is likely to be stuck after such a short time?

          Ninian added a comment - In fact from the timestamps it looks like the build was aborted after 4 seconds. Surely the 'isLikelyStuck' heuristic should never conclude that a build is likely to be stuck after such a short time?

          ikedam added a comment -

          "0 minutes" means a time less than 1 minutes.
          And it is a correct behavior if the job always finish in 1 seconds.

          What's your problem ?
          Build-timeout triggers timeout too sooner than the job always finishes?
          Or build-timeout should not trigger timeout so soon if the job always finish too soon ? (for example, adding a field for shortest timeout?)

          I want to know followings:

          • Does it happen to any jobs? Or It happens to a specific job?
          • If it happens to a specific job, steps to reproduce the problem.
          • Time the job always finishes.

          ikedam added a comment - "0 minutes" means a time less than 1 minutes. And it is a correct behavior if the job always finish in 1 seconds. What's your problem ? Build-timeout triggers timeout too sooner than the job always finishes? Or build-timeout should not trigger timeout so soon if the job always finish too soon ? (for example, adding a field for shortest timeout?) I want to know followings: Does it happen to any jobs? Or It happens to a specific job? If it happens to a specific job, steps to reproduce the problem. Time the job always finishes.

          Ed Randall added a comment -

          Problem is that "build timeout" triggers against a build which is progressing normally, not stuck. It triggers almost immediately, which seems pointless.

          Ed Randall added a comment - Problem is that "build timeout" triggers against a build which is progressing normally, not stuck. It triggers almost immediately, which seems pointless.

          ikedam added a comment -

          I cannot reproduce. What I tested:

          Environment: With Jenkins-1.509.2, Build-timeout 1.14 on Windows 8 64 bit, Java 1.7.0_45
          Steps:

          1. Create a free style project.
            • Enable "Abort the build if it's stuck"
              • Time-out strategy: Likely stuck
              • Time-out variable: TIMEOUTVALUE
                • This is added in Build-timeout 1.13. You can get the build timeout milliseconds
            • Add "Execute shell" ()
              echo ${TIMEOUTVALUE}
              sleep 180
              
          2. Run a build. The log was:
            Started by user anonymous
            Building in workspace C:\Users\ikedam\.jenkins\jobs\timeouttest\workspace
            [workspace] $ sh -xe C:\Users\ikedam\AppData\Local\Temp\hudson7811755437042469206.sh
            + echo 86400000
            86400000
            + sleep 180
            Finished: SUCCESS
            
          3. Run a build again. The log was:
            Started by user anonymous
            Building in workspace C:\Users\ikedam\.jenkins\jobs\timeouttest\workspace
            [workspace] $ sh -xe C:\Users\ikedam\AppData\Local\Temp\hudson670841287852715641.sh
            + echo 1803440
            1803440
            + sleep 180
            Finished: SUCCESS
            

          As far as I tested, It worked perfect.
          And as far as I reviewed the code, it should work as Executor#isLikelyStuck() does as described in the help text.

          ikedam added a comment - I cannot reproduce. What I tested: Environment: With Jenkins-1.509.2, Build-timeout 1.14 on Windows 8 64 bit, Java 1.7.0_45 Steps: Create a free style project. Enable "Abort the build if it's stuck" Time-out strategy: Likely stuck Time-out variable: TIMEOUTVALUE This is added in Build-timeout 1.13. You can get the build timeout milliseconds Add "Execute shell" () echo ${TIMEOUTVALUE} sleep 180 Run a build. The log was: Started by user anonymous Building in workspace C:\Users\ikedam\.jenkins\jobs\timeouttest\workspace [workspace] $ sh -xe C:\Users\ikedam\AppData\Local\Temp\hudson7811755437042469206.sh + echo 86400000 86400000 + sleep 180 Finished: SUCCESS Run a build again. The log was: Started by user anonymous Building in workspace C:\Users\ikedam\.jenkins\jobs\timeouttest\workspace [workspace] $ sh -xe C:\Users\ikedam\AppData\Local\Temp\hudson670841287852715641.sh + echo 1803440 1803440 + sleep 180 Finished: SUCCESS As far as I tested, It worked perfect. And as far as I reviewed the code, it should work as Executor#isLikelyStuck() does as described in the help text.

            kohsuke Kohsuke Kawaguchi
            edrandall Ed Randall
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: