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

            TimoTM TimoTM created issue -
            timotm TimoTM made changes -
            Field Original Value New Value
            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:

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

            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 TimoTM made changes -
            Environment 1.374
            timotm TimoTM made changes -
            Link This issue is related to JENKINS-4756 [ JENKINS-4756 ]
            mindless Alan Harder made changes -
            Link This issue is related to JENKINS-4756 [ JENKINS-4756 ]
            mindless Alan Harder made changes -
            Link This issue duplicates JENKINS-4756 [ JENKINS-4756 ]
            mindless Alan Harder made changes -
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Resolved [ 5 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 137456 ] JNJira + In-Review [ 187515 ]

              People

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

                Dates

                Created:
                Updated:
                Resolved: