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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Jenkins 1.420 on Windows 2003 Server

      Description

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

        Activity

        btb3 Martin Ba created issue -
        btb3 Martin Ba made changes -
        Field Original Value New Value
        Description 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:
        {noformat}
        <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/&lt;/url>
        <color>blue</color>
        </task>
        <why>Waiting for next available executor on </why>
        <buildableStartMilliseconds>1311772204293</buildableStartMilliseconds>
        </item>
        </queue>
        {noformat}

        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 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:
        {noformat}
        <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/&lt;/url>
        <color>blue</color>
        </task>
        <why>Waiting for next available executor on </why>
        <buildableStartMilliseconds>1311772204293</buildableStartMilliseconds>
        </item>
        </queue>
        {noformat}

        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.)
        Hide
        fmerrow 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 . . .

        Show
        fmerrow 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 . . .
        Hide
        fredg 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.

        Show
        fredg 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.
        fredg Fred G made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        fredg Fred G made changes -
        Assignee Fred G [ fredg ]
        Hide
        evernat evernat added a comment -

        Is it reproduced with a recent Jenkins version?

        Show
        evernat evernat added a comment - Is it reproduced with a recent Jenkins version?
        Hide
        fredg 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.

        Show
        fredg 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.
        fredg Fred G made changes -
        Assignee Fred G [ fredg ] Martin Ba [ btb3 ]
        Hide
        btb3 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>
        
        Show
        btb3 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>
        btb3 Martin Ba made changes -
        Assignee Martin Ba [ btb3 ] Fred G [ fredg ]
        Hide
        scm_issue_link 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

        Show
        scm_issue_link 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
        Hide
        danielbeck Daniel Beck added a comment -

        Resolved in 1.551 and up.

        Show
        danielbeck Daniel Beck added a comment - Resolved in 1.551 and up.
        danielbeck Daniel Beck made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        ircbot IRCbot Run by Kohsuke made changes -
        Component/s gui [ 15492 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: