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

EXECUTOR_NUMBER environment variable is not unique or reliable

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Duplicate
    • Component/s: core
    • Labels:
      None
    • Environment:
      1.374
    • Similar Issues:

      Description

      If I create a slave with a certain number of executors, and re-configure the amount of executors (e.g. first add one and delete one), the executor numbers of the executors might get mixed up.

      From thread dump of a setup where "esxi1" has been configured to have 2 executors (the value of the enviroment variable is 2 for both of these computers - the thread name seems to be derived from the executor number):

      Executor #2 for esxi1
      
      "Executor #2 for esxi1" Id=177096 Group=main WAITING on hudson.model.Queue@4a7f58c1
      	at java.lang.Object.wait(Native Method)
      	-  waiting on hudson.model.Queue@4a7f58c1
      	at java.lang.Object.wait(Object.java:485)
      	at hudson.util.OneShotEvent.block(OneShotEvent.java:72)
      	at hudson.model.Queue.pop(Queue.java:767)
      	at hudson.model.Executor.grabJob(Executor.java:165)
      	at hudson.model.Executor.run(Executor.java:106)
      
      
      Executor #2 for esxi1
      
      "Executor #2 for esxi1" Id=92496 Group=main WAITING on hudson.model.Queue@4a7f58c1
      	at java.lang.Object.wait(Native Method)
      	-  waiting on hudson.model.Queue@4a7f58c1
      	at java.lang.Object.wait(Object.java:485)
      	at hudson.util.OneShotEvent.block(OneShotEvent.java:72)
      	at hudson.model.Queue.pop(Queue.java:767)
      	at hudson.model.Executor.grabJob(Executor.java:165)
      	at hudson.model.Executor.run(Executor.java:106)
      
      

      In our system, we're utilizing the enviroment variable and having conflicts will break things.

      The conflicts seem to also happen sometimes spontaneously, without reconfiguring. However, I don't know under what circumstances.

        Attachments

          Issue Links

            Activity

            There are no comments yet on this issue.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              TimoTM TimoTM
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: