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

      The build timeout plugin does not seem to work for matrix jobs. I set a timeout, but it doesn't abort individual builds if they take longer.

          [JENKINS-6077] build timeout does not work for matrix jobs

          seb baz added a comment -

          Nor does the build timeout seem to apply if the build fails to even start, e.g. if the target node is offline.

          seb baz added a comment - Nor does the build timeout seem to apply if the build fails to even start, e.g. if the target node is offline.

          Brent Duffy added a comment -

          I'm seeing a similar problem for matrix jobs with build timeout set. I've seen one case where a matrix job with a 2x2 configuration times out, but the configurations appear to keep going and cannot be stopped. At the bottom of the console output for each configuration, I see the "Build timed out (after 120 minutes). Marking the build as aborted." entries in the logs, but the spinner at the bottom is still moving and each of the configuration jobs appear to keep trying to execute. I tried to stop each configuration build the normal way (clicking the red X), which didn't work after multiple attempts, so I looked at the threads via the JavaMelody Monitoring plugin and all 4 of them are in RUNNABLE state. Trying to kill each thread does not work either, so I'm stuck here with the only choice of restarting Jenkins.

          Brent Duffy added a comment - I'm seeing a similar problem for matrix jobs with build timeout set. I've seen one case where a matrix job with a 2x2 configuration times out, but the configurations appear to keep going and cannot be stopped. At the bottom of the console output for each configuration, I see the "Build timed out (after 120 minutes). Marking the build as aborted." entries in the logs, but the spinner at the bottom is still moving and each of the configuration jobs appear to keep trying to execute. I tried to stop each configuration build the normal way (clicking the red X), which didn't work after multiple attempts, so I looked at the threads via the JavaMelody Monitoring plugin and all 4 of them are in RUNNABLE state. Trying to kill each thread does not work either, so I'm stuck here with the only choice of restarting Jenkins.

          ikedam added a comment -

          Could not reproduce in my environment.
          Build timeout does not (and can not) start its timer for matrix parents.
          Please report detailed steps to reproduce the problem, and attach log files.
          (Especially I want versions of Jenkins and plugins)

          This ticket will be closed in a month if no more reports.

          ikedam added a comment - Could not reproduce in my environment. Build timeout does not (and can not) start its timer for matrix parents. Please report detailed steps to reproduce the problem, and attach log files. (Especially I want versions of Jenkins and plugins) This ticket will be closed in a month if no more reports.

          Alex Coaton added a comment -

          I've just seen this issue too.  In our case, we run a multi-configuration job to sync git reference repos across multiple slaves.  When one of those slaves is inaccessible (offline because it ran out of disk space for example) then the multi-config job hangs waiting to connect with that slave and does not time out after an absolute limit.

          Sorry, I'm not sure which versions of Jenkins and plugins we're using because I don't have admin access.

          Alex Coaton added a comment - I've just seen this issue too.  In our case, we run a multi-configuration job to sync git reference repos across multiple slaves.  When one of those slaves is inaccessible (offline because it ran out of disk space for example) then the multi-config job hangs waiting to connect with that slave and does not time out after an absolute limit. Sorry, I'm not sure which versions of Jenkins and plugins we're using because I don't have admin access.

          ikedam added a comment -

          Please attach the console log.
          And I also want to know the configuration of your job, especially what you mean with "sync git reference repos across multiple slaves", as build-timeout doesn't work while the SCM phase.

          ikedam added a comment - Please attach the console log. And I also want to know the configuration of your job, especially what you mean with "sync git reference repos across multiple slaves", as build-timeout doesn't work while the SCM phase.

          Alex Coaton added a comment -

          I've attached the raw config and console output ikedam (with some details hashed out).

          Alex Coaton added a comment - I've attached the raw config and console output ikedam (with some details hashed out).

          ikedam added a comment -

          almeister
          Please attach the console log of the child build.
          As I described before, build-timeout doesn't work for parent builds.

          ikedam added a comment - almeister Please attach the console log of the child build. As I described before, build-timeout doesn't work for parent builds.

          Alex Coaton added a comment -

          Morning ikedam, the child build on sto-osx-farm09 only kicked off 4 hours after the parent job was triggered because we reconnected that slave and it subsequently failed trying to clone from git.  The parent job has an absolute timeout of 120 minutes and so we were expecting the parent job to kill the child job on timeout.

          I hear what you're saying - that's not the intended behaviour for multi-config jobs.  Do you know why that is the case?

          Alex Coaton added a comment - Morning ikedam , the child build on sto-osx-farm09 only kicked off 4 hours after the parent job was triggered because we reconnected that slave and it subsequently failed trying to clone from git.  The parent job has an absolute timeout of 120 minutes and so we were expecting the parent job to kill the child job on timeout. I hear what you're saying - that's not the intended behaviour for multi-config jobs.  Do you know why that is the case?

          ikedam added a comment -

          almeister
          What you expect: the parent build times out.
          Actual behavior: build-timeout doesn't work for the parent build.

          I can't get which you mean with "that",
          but the actual behavior is the design of build-timeout as it's implemented as BuildWrapper, which works only while running build steps, only on child builds.
          What you expect sounds rather timeouts of the queue, and Queue Cleanup plugin might help you.

          ikedam added a comment - almeister What you expect: the parent build times out. Actual behavior: build-timeout doesn't work for the parent build. I can't get which you mean with "that", but the actual behavior is the design of build-timeout as it's implemented as BuildWrapper, which works only while running build steps, only on child builds. What you expect sounds rather timeouts of the queue, and Queue Cleanup plugin might help you.

            almeister Alex Coaton
            larsko larsko
            Votes:
            7 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: