EXECUTOR_NUMBER environment variable is not unique or reliable

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

            Assignee:
            Unassigned
            Reporter:
            TimoTM
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: