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

Parameterized builds executed concurrently when they should not

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Debian 5.0 "Lenny"
      Linux 2.6.26-2-amd64 #1 SMP Tue Jan 12 22:12:20 UTC 2010 x86_64 GNU/Linux

      Recent builds of Hudson have introduced a regression in parameterized builds, which get executed concurrently when they should not.

      Here is a simple test case to reproduce the issue with Hudson 1.346 (latest version as I speak). Note that the "Execute concurrent builds if necessary (beta)" feature is disabled (checkbox not ticked).

      • Make sure the system is configured to have at least 2 executors.
      • Create a new freestyle job 'Test'.
      • Tick 'This build is parameterized' and add a 'Dummy' String parameter.
      • Add an 'Execute shell' build step with the following script: 'export $WORKSPACE && sleep 30'.
      • Save the job.
      • Schedule 3 builds with different parameter values (a/b/c), quickly enough so that two builds get queued before the first one finishes.
      • Wait for the first build to finish.
      • Watch the 'Build history' frame: it will show two builds with a progress bar.
      • Upon completion, one of the two builds executed concurrently will have the following console output, proving that both builds were executed at the same time (notice 'workspace@2'):

      [workspace@2] $ /bin/sh -xe /tmp/hudson8995552964371253777.sh
      + echo /var/hudson/jobs/test/workspace@2
      /var/hudson/jobs/test/workspace@2
      + sleep 20
      Finished: SUCCESS

      This issue may be related to JENKINS-2997 and JENKINS-5229. Note that JENKINS-2997 was a display-only issue and has been around for much longer.

            Unassigned Unassigned
            maxence maxence
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: