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

Build Queue does not show the executor a build is waiting for

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • Jenkins 1.420 on Windows 2003 Server

      I have a Job bound to master. This job has been started by a script and is now waiting for execution on master because another Job is running on the master (one executor).

      The Build Queue mouseover displays: "Waiting for next available executor on" (no mention of which node)

      The Build Queue xml api shows:

      <queue>
      	<item>
      		<action>
      			<cause>
      				<shortDescription>Started by remote host 127.0.0.1 with note: server_post_promote transaction -snip- / 169402 @ 2011/07/27 13:10:03</shortDescription>
      			</cause>
      			<cause>
      				<shortDescription>Started by remote host 127.0.0.1 with note: server_post_promote transaction -snip- / 169419 @ 2011/07/27 13:21:18</shortDescription>
      			</cause>
      		</action>
      		<blocked>false</blocked>
      		<buildable>true</buildable>
      		<params></params>
      		<stuck>true</stuck>
      		<task>
      			<name>BS-Update-1</name>
      			<url>http://-snip-/jenkins/job/BS-Update-1/</url>
      			<color>blue</color>
      		</task>
      		<why>Waiting for next available executor on </why>
      		<buildableStartMilliseconds>1311772204293</buildableStartMilliseconds>
      	</item>
      </queue>
      

      Note how the why is missing the node name.

      Going to the job page however, the Build history is (correctly) displaying: "#24 (pending - Waiting for next available executor on master )"

      I have also cross-checked with another job that is also bound to master:
      When I start it manually, the same problem exists wrt. to the non-displayed node name.
      (And I assume that the fact that this job is display as "stuck" whereas the manually started one isn't, is just to do with how "stuck" is calculated and that this job has waited more often or something.)

          [JENKINS-10468] Build Queue does not show the executor a build is waiting for

          Frank Merrow added a comment - - edited

          Odd to find this problem being so old, but I have some updates which might apply here . . .

          I see this issue as described above in 1.458. However, I also have two systems one at 1.459 and one at 1.460 . . . in both these systems, when I mouse over a pending job that is waiting for an executor I see "Waiting for next available executor on <line noise>". (Line Noise == Huge long string of random characters that fills the screen to the right.)

          Note that whatever this issue is, it is not isolated to the GUI. Both those systems, ONLY when there is a job waiting for a specific system, the JSON returned from a python/jenkins get_queue_info() returns as "malformed" error . . . I debugged into the JSON and see this exact same message (with line noise) shown in the malformed JSON packet . . . at exactly the place in the JSON that the error message said was malformed.

          Like I say, for both the GUI and the JSON . . . this only happens when a job is waiting for a specific system . . . other types of jobs do no cause this problem. Unfortunately, we have a fair percentage of these on some systems.

          I down graded the machine at 1.460 to 1.458 . . . now JSON works, but as noted above, the system name is now not shown . . . I'm guessing in one version you got lucky and are pointing at zero to terminate the string, but in the next two version you just happened to point at active data.

          NOTE: I find this very easy to duplicate on my systems:
          1. fill up all executors with any job (my favorite is sleep 1000000)
          2. now queue any job that requires a specific system to run . . .
          3. wait 15 seconds, then mouse over the waiting job.

          Frank

          P.S. This problem will duplicate as described even if ALL PLUGINS are disabled . . . it is not a plugin issue . . . at least not in 1.459 and/or 1.460 . . .

          Frank Merrow added a comment - - edited Odd to find this problem being so old, but I have some updates which might apply here . . . I see this issue as described above in 1.458. However, I also have two systems one at 1.459 and one at 1.460 . . . in both these systems, when I mouse over a pending job that is waiting for an executor I see "Waiting for next available executor on <line noise>". (Line Noise == Huge long string of random characters that fills the screen to the right.) Note that whatever this issue is, it is not isolated to the GUI. Both those systems, ONLY when there is a job waiting for a specific system, the JSON returned from a python/jenkins get_queue_info() returns as "malformed" error . . . I debugged into the JSON and see this exact same message (with line noise) shown in the malformed JSON packet . . . at exactly the place in the JSON that the error message said was malformed. Like I say, for both the GUI and the JSON . . . this only happens when a job is waiting for a specific system . . . other types of jobs do no cause this problem. Unfortunately, we have a fair percentage of these on some systems. I down graded the machine at 1.460 to 1.458 . . . now JSON works, but as noted above, the system name is now not shown . . . I'm guessing in one version you got lucky and are pointing at zero to terminate the string, but in the next two version you just happened to point at active data. NOTE: I find this very easy to duplicate on my systems: 1. fill up all executors with any job (my favorite is sleep 1000000) 2. now queue any job that requires a specific system to run . . . 3. wait 15 seconds, then mouse over the waiting job. Frank P.S. This problem will duplicate as described even if ALL PLUGINS are disabled . . . it is not a plugin issue . . . at least not in 1.459 and/or 1.460 . . .

          Fred G added a comment -

          The huge long string of random characters that Frank describes is probably caused by my recent commit: https://github.com/jenkinsci/jenkins/commit/ff4b02559534c4c67ef95a13defcd7a4fc850a1b

          I already opened up a pull request to fix this issue. Sorry for the inconveniences caused.

          Fred G added a comment - The huge long string of random characters that Frank describes is probably caused by my recent commit: https://github.com/jenkinsci/jenkins/commit/ff4b02559534c4c67ef95a13defcd7a4fc850a1b I already opened up a pull request to fix this issue. Sorry for the inconveniences caused.

          evernat added a comment -

          Is it reproduced with a recent Jenkins version?

          evernat added a comment - Is it reproduced with a recent Jenkins version?

          Fred G added a comment -

          The long string of random characters was fixed with pull request https://github.com/jenkinsci/jenkins/pull/467 in Jenkins version 1.467.
          Not sure about the original issue.
          Assigning back to the reporter.

          Fred G added a comment - The long string of random characters was fixed with pull request https://github.com/jenkinsci/jenkins/pull/467 in Jenkins version 1.467. Not sure about the original issue. Assigning back to the reporter.

          Martin Ba added a comment -

          I re-checked the issue with my updated Jenkins 1.480.3.

          Still the same. The build queue is showing:

          <why>Waiting for next available executor on </why>
          

          without any node info.
          This time, this is a local Jenkins test-instance and not even the actual build server I used originally.

          List of installed plugins:

          • External Monitor Job Type Plugin
          • LDAP Plugin
          • pam-auth
          • ant
          • Token Macro Plugin
          • javadoc
          • build-name-setter
          • Maven Integration plugin
          • Dashboard View
          • Build Pipeline Plugin
          • Jenkins user build vars plugin
          • Run Condition Plugin
          • conditional-buildstep
          • Jenkins CVS Plug-in
          • Downstream build view
          • Environment Injector Plugin
          • Extended Choice Parameter Plug-In
          • Hudson Groovy builder
          • Jenkins Subversion Plug-in
          • Jenkins Parameterized Trigger plugin
          • Jenkins Multijob plugin
          • Jython Plugin
          • Locale plugin
          • Priority Sorter
          • Role-based Authorization Strategy
          • Jenkins SSH Slaves plugin
          • Jenkins Throttle Concurrent Builds Plug-in
          • Jenkins Translation Assistance plugin

          Full queue XML:

          <queue>
          	<item>
          		<action>
          			<parameter>
          				<name>P1</name>
          				<value/>
          			</parameter>
          		</action>
          		<action>
          			<cause>
          				<shortDescription>Started by user xxxxx</shortDescription>
          				<userId>xxxxx</userId>
          				<userName>xxxxx</userName>
          			</cause>
          		</action>
          		<blocked>false</blocked>
          		<buildable>true</buildable>
          		<id>6</id>
          		<inQueueSince>1368438462785</inQueueSince>
          		<params>
          			(StringParameterValue) P1=''
          		</params>
          		<stuck>false</stuck>
          		<task>
          			<name>Single3</name>
          			<url>http://localhost:8080/job/Single3/</url>
          			<color>blue</color>
          		</task>
          		<why>Waiting for next available executor on </why>
          		<buildableStartMilliseconds>1368438462894</buildableStartMilliseconds>
          	</item>
          </queue>
          

          Martin Ba added a comment - I re-checked the issue with my updated Jenkins 1.480.3. Still the same. The build queue is showing: <why>Waiting for next available executor on </why> without any node info. This time, this is a local Jenkins test-instance and not even the actual build server I used originally. List of installed plugins: External Monitor Job Type Plugin LDAP Plugin pam-auth ant Token Macro Plugin javadoc build-name-setter Maven Integration plugin Dashboard View Build Pipeline Plugin Jenkins user build vars plugin Run Condition Plugin conditional-buildstep Jenkins CVS Plug-in Downstream build view Environment Injector Plugin Extended Choice Parameter Plug-In Hudson Groovy builder Jenkins Subversion Plug-in Jenkins Parameterized Trigger plugin Jenkins Multijob plugin Jython Plugin Locale plugin Priority Sorter Role-based Authorization Strategy Jenkins SSH Slaves plugin Jenkins Throttle Concurrent Builds Plug-in Jenkins Translation Assistance plugin Full queue XML: <queue> <item> <action> <parameter> <name>P1</name> <value/> </parameter> </action> <action> <cause> <shortDescription>Started by user xxxxx</shortDescription> <userId>xxxxx</userId> <userName>xxxxx</userName> </cause> </action> <blocked>false</blocked> <buildable>true</buildable> <id>6</id> <inQueueSince>1368438462785</inQueueSince> <params> (StringParameterValue) P1='' </params> <stuck>false</stuck> <task> <name>Single3</name> <url>http://localhost:8080/job/Single3/</url> <color>blue</color> </task> <why>Waiting for next available executor on </why> <buildableStartMilliseconds>1368438462894</buildableStartMilliseconds> </item> </queue>

          Code changed in jenkins
          User: Fred G
          Path:
          core/src/main/java/hudson/model/queue/CauseOfBlockage.java
          http://jenkins-ci.org/commit/jenkins/b89b44816311b933be56b1452820ea71b7127b22
          Log:
          FIXED JENKINS-10468 - Build Queue does not show the executor a build is
          waiting for

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Fred G Path: core/src/main/java/hudson/model/queue/CauseOfBlockage.java http://jenkins-ci.org/commit/jenkins/b89b44816311b933be56b1452820ea71b7127b22 Log: FIXED JENKINS-10468 - Build Queue does not show the executor a build is waiting for

          Daniel Beck added a comment -

          Resolved in 1.551 and up.

          Daniel Beck added a comment - Resolved in 1.551 and up.

          Vijaykumar Mamidala added a comment - - edited

          JSON is listing job name only for FreeStyle projects not for other projects like pipelines, multibranch pipelines under task.

          Jenkins Version: Jenkins 2.235.2

          fredg any comments on this? Please help.

          Vijaykumar Mamidala added a comment - - edited JSON is listing job name only for FreeStyle projects not for other projects like pipelines, multibranch pipelines under task. Jenkins Version:  Jenkins 2.235.2 fredg any comments on this? Please help.

            fredg Fred G
            btb3 Martin Ba
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: