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

the EXECUTOR_NUMBER environment variable is not unique

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • ant-plugin
    • None
    • Platform: All, OS: Linux

      When two ant tasks are run in parallel, sometimes the EXECUTOR_NUMBER for the
      two tasks are the same. The EXECTOR_NUMBER variable should be unique for each
      task. Here is the documentation URL for the EXECUTOR_NUMBER environment variable.

      http://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project

      Below are the steps to reproduce this issue.

      Note: This defect seems to be non-deterministic. I will list the steps that,
      when followed, will often produce the described defect.

      1. Create four new Hudson jobs.
      2. Configure each job. Under each job's "Build" section Add a build step,
      select "invoke Ant".
      3. Click the "Advanced" button under the "Invoke Ant" section. Paste the
      following into the "Properties" text box.

      EXECUTOR_NUMBER=$EXECUTOR_NUMBER

      4. Configure the Ant build step of each job to run an ant task that prints out
      the ${EXECUTOR_NUMBER} variable.
      5. Setup Hudson to be able to run four executors simultaneously.
      6. Launch each of the four jobs in parallel. Try to launch them at the same
      time if possible.
      7. Look at the console output of each of the jobs. On some runs, two separate
      jobs will use the same executor number.
      8. When step 7 has finished, if the defect has not manifested itself, repeat
      steps 6 and 7.

        1. build.xml
          0.2 kB
          mdemmitt
        2. configuring_tasks.png
          348 kB
          mdemmitt
        3. executor_list.png
          22 kB
          mdemmitt
        4. fix-HUDSON-4756+7357.patch
          5 kB
          janick reynders
        5. task1.png
          519 kB
          mdemmitt
        6. task2.png
          500 kB
          mdemmitt
        7. task3.png
          551 kB
          mdemmitt
        8. task4.png
          492 kB
          mdemmitt

            Unassigned Unassigned
            mdemmitt mdemmitt
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: