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

Hudson build time is calculated from the time job enters the queue while it should be when job actually starts to run

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • build-timeout-plugin
    • None
    • Hudson ver. 1.380

      I'm using build timeout plugin and there's evident that the build time includes the time a job spent waiting in the build queue.

      Let say I have build timeout set to 6 hours. But my job was actually executed for 1 hour or so before the build timeout plugin kicked in and killed it. So that 5 hour difference was actually spent in the build queue waiting for a available slave.

      I think it makes more sense to assume build time start ticking only when the job executes

          [JENKINS-7832] Hudson build time is calculated from the time job enters the queue while it should be when job actually starts to run

          hhuynh created issue -
          km made changes -
          Assignee Original: Kohsuke Kawaguchi [ kohsuke ] New: km [ km ]

          km added a comment -

          The plugin implements a build wrapper. Build wrappers are run only when the actual build is run, taking the job off the build queue. So, I think there is something wrong in what you're seeing. Does it happen on a remote build or you can demonstrate even when the build happens on master? Any console output?

          km added a comment - The plugin implements a build wrapper. Build wrappers are run only when the actual build is run, taking the job off the build queue. So, I think there is something wrong in what you're seeing. Does it happen on a remote build or you can demonstrate even when the build happens on master? Any console output?

          hhuynh added a comment -

          Thanks for looking into it. We observed it happened on a remote slave. I'm trying to reproduce it but could get it to happen at will.

          Do you know what happens if the slave and master couldn't communicate? Would a network glitch between the two let to this problem? I'm just trying possible causes so I can reproduce the issue

          hhuynh added a comment - Thanks for looking into it. We observed it happened on a remote slave. I'm trying to reproduce it but could get it to happen at will. Do you know what happens if the slave and master couldn't communicate? Would a network glitch between the two let to this problem? I'm just trying possible causes so I can reproduce the issue

          hhuynh added a comment -

          It happened again. The dashboard says the job ran for a little over 8 hours (my max build time is set at 8 hours) but in the log, the job was barely run. It didn't even finish downloading artifacts yet.

          Currently when it failed, there is no time stamp at the end of the console log to see what exact time that it did fail. That makes debugging this problem tricky.

          hhuynh added a comment - It happened again. The dashboard says the job ran for a little over 8 hours (my max build time is set at 8 hours) but in the log, the job was barely run. It didn't even finish downloading artifacts yet. Currently when it failed, there is no time stamp at the end of the console log to see what exact time that it did fail. That makes debugging this problem tricky.
          hhuynh made changes -
          Attachment New: consoleText.txt [ 19953 ]
          Attachment New: dashboard.png [ 19954 ]

          km added a comment -

          Thanks for the details. Network glitch may cause this problem (but I am not 100% sure). Let me debug this further.

          km added a comment - Thanks for the details. Network glitch may cause this problem (but I am not 100% sure). Let me debug this further.

          Eric Griswold added a comment - - edited

          I tried to duplicate this problem on Jenkins 1.509.1 but was unable to do so.

          Eric Griswold added a comment - - edited I tried to duplicate this problem on Jenkins 1.509.1 but was unable to do so.

          ikedam added a comment -

          Is this problem still reproduced?
          As @km said, this shouldn't be triggered by build-timeout plugin for its design, and it seems something strange happen in communication between the master and slaves.
          I need more information to say what's the root cause, and please let me know you can still reproduce the problem.

          ikedam added a comment - Is this problem still reproduced? As @km said, this shouldn't be triggered by build-timeout plugin for its design, and it seems something strange happen in communication between the master and slaves. I need more information to say what's the root cause, and please let me know you can still reproduce the problem.

          This is still an issue for me running 1.558. I am seeing this consistently happen across 5 build configurations. Let me know which information is needed to dissect this issue.

          Daniel Klingensmith added a comment - This is still an issue for me running 1.558. I am seeing this consistently happen across 5 build configurations. Let me know which information is needed to dissect this issue.

            km km
            hhuynh hhuynh
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: