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

EXECUTOR_NUMBER environment variable is not unique or reliable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • core
    • None
    • 1.374

      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.

          [JENKINS-7357] EXECUTOR_NUMBER environment variable is not unique or reliable

          TimoTM created issue -
          TimoTM made changes -
          Description Original:
          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:

          {noformat}

          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)

          {noformat}

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

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

          New: 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):

          {noformat}

          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)

          {noformat}

          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.

          TimoTM made changes -
          Environment New: 1.374
          TimoTM made changes -
          Link New: This issue is related to JENKINS-4756 [ JENKINS-4756 ]
          Alan Harder made changes -
          Link Original: This issue is related to JENKINS-4756 [ JENKINS-4756 ]
          Alan Harder made changes -
          Link New: This issue duplicates JENKINS-4756 [ JENKINS-4756 ]
          Alan Harder made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 137456 ] New: JNJira + In-Review [ 187515 ]

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

              Created:
              Updated:
              Resolved: