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 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.

          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.

          ikedam added a comment -

          I want to see how much time each steps of builds spend.
          Could you install Timestamper plugin, enable "Add timestamps to the Console Output" in your job, and attach a consple output that reproduces the problem?

          ikedam added a comment - I want to see how much time each steps of builds spend. Could you install Timestamper plugin , enable "Add timestamps to the Console Output" in your job, and attach a consple output that reproduces the problem?

          Daniel Beck added a comment -

          ikedam: I think this issue could have merit if the build timeout plugin does not take into account that the flyweight parent build for e.g. Maven or Matrix projects starts immediately (due to use of one-off executors), while the real (module / configuration) build needs to wait until an executor becomes available.

          Daniel Beck added a comment - ikedam : I think this issue could have merit if the build timeout plugin does not take into account that the flyweight parent build for e.g. Maven or Matrix projects starts immediately (due to use of one-off executors), while the real (module / configuration) build needs to wait until an executor becomes available.

          ikedam added a comment -

          I haven't tested a maven project.
          "Module Builds" in the screenshot indicates that was a maven project.
          I'll try that.

          Build-timeout isn't triggered for matrix panents.
          Though I don't know how maven projects work, it looks that build-timeout shouldn't work for maven parent.

          ikedam added a comment - I haven't tested a maven project. "Module Builds" in the screenshot indicates that was a maven project. I'll try that. Build-timeout isn't triggered for matrix panents. Though I don't know how maven projects work, it looks that build-timeout shouldn't work for maven parent.

          ikedam added a comment -

          I couldn't reproduce the problem with maven projects.

          • Maven projects only requires one executor, and shouldn't stick wating for executors.
          • Checking "Build modules in parallel" results "Building single Maven modules is not implemented for Maven 3, yet!" and builds abort immediately.

          Please reopen this issue or create a new issue if you can reproduce the problem using maven projects, and let me know the exact way to reproduce that.

          ikedam added a comment - I couldn't reproduce the problem with maven projects. Maven projects only requires one executor, and shouldn't stick wating for executors. Checking "Build modules in parallel" results "Building single Maven modules is not implemented for Maven 3, yet!" and builds abort immediately. Please reopen this issue or create a new issue if you can reproduce the problem using maven projects, and let me know the exact way to reproduce that.

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

              Created:
              Updated:
              Resolved: