• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • Jenkins ver. 1.480.3

      At Load statistics, it showing busy executors in minus(negative).
      which seems wrong. it should be in plus .

      please share fix for this.

          [JENKINS-21618] wrong Load statistics: busy executors in minus

          Version 1.480 is very old. Are you able to reproduce this with a newer Jenkins version?

          Christopher Orr added a comment - Version 1.480 is very old. Are you able to reproduce this with a newer Jenkins version?

          hiteswar kumar added a comment - - edited

          i am running Latest Jenkins ver. 1.532.2 and found same sometime.
          i think , this(negative busy executors) is because of offline slave because of launch failure.
          i am not sure is it right way to put offline slaves statistics at load statistics page in this way. somewhere else right place.

          hiteswar kumar added a comment - - edited i am running Latest Jenkins ver. 1.532.2 and found same sometime. i think , this(negative busy executors) is because of offline slave because of launch failure. i am not sure is it right way to put offline slaves statistics at load statistics page in this way. somewhere else right place.

          Daniel Beck added a comment -

          Please provide complete and detailed instructions on how to reproduce this issue on recent Jenkins versions, i.e. 1.554.x or 1.560 or higher.

          FWIW 1.532.2 hasn't been the "latest" in a long time.

          Daniel Beck added a comment - Please provide complete and detailed instructions on how to reproduce this issue on recent Jenkins versions, i.e. 1.554.x or 1.560 or higher. FWIW 1.532.2 hasn't been the "latest" in a long time.

          Daniel Beck added a comment -

          Issue seems obvious form the code:

          • LoadStatistics' "busy executors" count is (total - idle), but their definition in ComputerSet is inconsistent:
            • total: those that are online
            • idle: those that are (online or connecting) and accepting work

          So nodes currently being connected are counted for the latter, not the former. IOW, you can have 0 total executors but >0 idle executors, leading to negative "busy" counts.

          Daniel Beck added a comment - Issue seems obvious form the code: LoadStatistics' "busy executors" count is (total - idle), but their definition in ComputerSet is inconsistent: total: those that are online idle: those that are (online or connecting) and accepting work So nodes currently being connected are counted for the latter, not the former. IOW, you can have 0 total executors but >0 idle executors, leading to negative "busy" counts.

          Alexis Morelle added a comment - - edited

          Got the same in Jenkins ver. 1.565.2
          Daniel's comment is relevant, seems to always come with a negative spike of available executors.

          – nevermind... didn't see the PR.

          Alexis Morelle added a comment - - edited Got the same in Jenkins ver. 1.565.2 Daniel's comment is relevant, seems to always come with a negative spike of available executors. – nevermind... didn't see the PR.

          Stephen Connolly added a comment - See https://github.com/jenkinsci/jenkins/pull/1480

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          core/src/main/java/hudson/model/Label.java
          core/src/main/java/hudson/model/LoadStatistics.java
          core/src/main/java/hudson/model/OverallLoadStatistics.java
          core/src/main/java/hudson/slaves/NodeProvisioner.java
          core/src/main/java/jenkins/model/Jenkins.java
          core/src/main/java/jenkins/model/UnlabeledLoadStatistics.java
          core/src/main/resources/hudson/model/Messages.properties
          core/src/test/java/hudson/model/LoadStatisticsTest.java
          http://jenkins-ci.org/commit/jenkins/6b8af39b0317bad90851d4f8025fd71fadb9deaa
          Log:
          [FIXED JENKINS-21618] Ensure that the LoadStatistics return a self-consistent result.

          The original method of computing load statistics would compute the total and idle counts independently
          which could lead to counting errors while jobs started in between the different state counting operations.
          This change switches to returning a `LoadStatisticsSnapshot` so that callers will get a single consistent
          view of the counts which was valid for at least one point in time during the collection of the snapshot.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/hudson/model/Label.java core/src/main/java/hudson/model/LoadStatistics.java core/src/main/java/hudson/model/OverallLoadStatistics.java core/src/main/java/hudson/slaves/NodeProvisioner.java core/src/main/java/jenkins/model/Jenkins.java core/src/main/java/jenkins/model/UnlabeledLoadStatistics.java core/src/main/resources/hudson/model/Messages.properties core/src/test/java/hudson/model/LoadStatisticsTest.java http://jenkins-ci.org/commit/jenkins/6b8af39b0317bad90851d4f8025fd71fadb9deaa Log: [FIXED JENKINS-21618] Ensure that the LoadStatistics return a self-consistent result. The original method of computing load statistics would compute the total and idle counts independently which could lead to counting errors while jobs started in between the different state counting operations. This change switches to returning a `LoadStatisticsSnapshot` so that callers will get a single consistent view of the counts which was valid for at least one point in time during the collection of the snapshot.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: changelog.html http://jenkins-ci.org/commit/jenkins/46dc6850edb1d7ef52592794b15e69db7dfbed1a Log: Noting merges JENKINS-15355 JENKINS-21618 JENKINS-22941 JENKINS-25938 JENKINS-26391 JENKINS-26900 JENKINS-27476 JENKINS-27563 JENKINS-27564 JENKINS-27565 JENKINS-27566 Fixing link text for JENKINS-6167

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4044

          Result = UNSTABLE

          dogfood added a comment - Integrated in jenkins_main_trunk #4044 Result = UNSTABLE

            danielbeck Daniel Beck
            hiteswar_kumar hiteswar kumar
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: