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

trottle-concurrent-build-plugin allowes concureent jobs under circumstances

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major

      Assume one project triggered parts of triggered by different upstream projects:

      freebsd-all

      • freebsd-checkout-source
      • freebsd-checkout-ports
      • freebsd-makeindex
      • freebsd-portversion
      • freebsd-buildworld
      • freebsd-buildkernel
      • freebsd-installkernel
      • reboot
      • freebsd-installworld
      • reboot
      • freebsd-portupgrade
      • reboot
      • freebsd-testsuite

      freebsd-ports

      • freebsd-checkout-ports
      • freebsd-makeindex
      • freebsd-portversion
      • freebsd-portupgrade
      • reboot
      • freebsd-testsuite

      now lets trigger freebsd-all if scm changes in the source tree are detected, and lets trigger freebsd-ports if sm changes in the ports tree are detected. Since both builds share some downstream builders it is necessary to block freebsd-all if freebsd-ports is running and to block freebsd-ports if freebsd-all is running. To achieve it I'd defined token freebsd.
      Now freebsd-all sets token freebsd -> blocking itself and freebsd-ports if it is running.
      Same for freebsd-ports: sets token freebsd -> blocking itself and freebsd-all.

      If you now trigger both at the very same time, both will acquire token freebsd and both jobs will run in parallel messing up some things – or at least doing them twice!

      Looks like locking implemented by trottle-concurrent-builds leads to a race condition allowing both builds to acquire the same token and both think its all OK to run now.

          [JENKINS-29141] trottle-concurrent-build-plugin allowes concureent jobs under circumstances

          Oleg Nenashev added a comment -

          Sorry for missing this issue.
          Is it actual now? TCB plugin is known to be non-reliable in 1.535...1.609.1 due to the executors handling approach changes. If you see the issue on other version, please provide more details.

          Oleg Nenashev added a comment - Sorry for missing this issue. Is it actual now? TCB plugin is known to be non-reliable in 1.535...1.609.1 due to the executors handling approach changes. If you see the issue on other version, please provide more details.

          Clemens Loos added a comment -

          Is there any news on this issue? Since updating to jenkins 1.638 (was some 1.5XX before) I face the same issue. When two jobs are triggered nearly at the same time they start running in parallel. When I trigger them manually they will wait for each other.

          Clemens Loos added a comment - Is there any news on this issue? Since updating to jenkins 1.638 (was some 1.5XX before) I face the same issue. When two jobs are triggered nearly at the same time they start running in parallel. When I trigger them manually they will wait for each other.

          Oleg Nenashev added a comment -

          clerenz there was no response from the submitter, so there was no way to proceed.

          For 1.638 it sounds interesting, because it should perform queue snap-shoting correctly.
          Could you please provide info about job types and other plugins you use?

          Oleg Nenashev added a comment - clerenz there was no response from the submitter, so there was no way to proceed. For 1.638 it sounds interesting, because it should perform queue snap-shoting correctly. Could you please provide info about job types and other plugins you use?

          Clemens Loos added a comment -

          Hi oleg_nenashev,
          these are my Plug-Ins:

          • analysis-core: 1.74
          • ant: 1.2
          • antisamy-markup-formatter: 1.3
          • autojobs-plugin: 1.0
          • build-pipeline-plugin: 1.4.9
          • categorized-view: 1.8
          • checkstyle: 3.43
          • conditional-buildstep: 1.3.3
          • credentials: 1.24
          • cvs: 2.12
          • dashboard-view: 2.9.6
          • email-ext: 2.40.5
          • emma: 1.29
          • emmacoveragecolumn: 0.0.4
          • external-monitor-job: 1.4
          • fail-the-build-plugin: 1.0
          • findbugs: 4.62
          • flexible-publish: 0.14.1
          • git-client: 1.19.0
          • git: 2.4.0
          • greenballs: 1.15
          • groovy: 1.27
          • jacoco: 1.0.19
          • javadoc: 1.3
          • jobConfigHistory: 2.12
          • jquery: 1.11.2-0
          • jshint-checkstyle: 3.36
          • junit: 1.9
          • ldap: 1.11
          • m2release: 0.14.0
          • mailer: 1.16
          • mapdb-api: 1.0.6.0
          • matrix-auth: 1.2
          • matrix-project: 1.6
          • maven-plugin: 2.12.1
          • maven-repo-cleaner: 1.2
          • nested-view: 1.14
          • pam-auth: 1.2
          • parameterized-trigger: 2.29
          • port-allocator: 1.8
          • role-strategy: 2.2.0
          • run-condition: 1.0
          • scm-api: 1.0
          • script-security: 1.15
          • ssh-credentials: 1.11
          • ssh-slaves: 1.10
          • subversion: 2.5.4
          • throttle-concurrents: 1.8.4
          • token-macro: 1.11
          • translation: 1.12
          • view-column-plugin: 1.2
          • violations: 0.7.11
          • windows-slaves: 1.1
          • ws-cleanup: 0.28
          • xvfb: 1.1.0
            The regarding jobs are two matrix configuration jobs that are triggered (in the failing case) both from pushes to the same git repository.

          Clemens Loos added a comment - Hi oleg_nenashev , these are my Plug-Ins: analysis-core: 1.74 ant: 1.2 antisamy-markup-formatter: 1.3 autojobs-plugin: 1.0 build-pipeline-plugin: 1.4.9 categorized-view: 1.8 checkstyle: 3.43 conditional-buildstep: 1.3.3 credentials: 1.24 cvs: 2.12 dashboard-view: 2.9.6 email-ext: 2.40.5 emma: 1.29 emmacoveragecolumn: 0.0.4 external-monitor-job: 1.4 fail-the-build-plugin: 1.0 findbugs: 4.62 flexible-publish: 0.14.1 git-client: 1.19.0 git: 2.4.0 greenballs: 1.15 groovy: 1.27 jacoco: 1.0.19 javadoc: 1.3 jobConfigHistory: 2.12 jquery: 1.11.2-0 jshint-checkstyle: 3.36 junit: 1.9 ldap: 1.11 m2release: 0.14.0 mailer: 1.16 mapdb-api: 1.0.6.0 matrix-auth: 1.2 matrix-project: 1.6 maven-plugin: 2.12.1 maven-repo-cleaner: 1.2 nested-view: 1.14 pam-auth: 1.2 parameterized-trigger: 2.29 port-allocator: 1.8 role-strategy: 2.2.0 run-condition: 1.0 scm-api: 1.0 script-security: 1.15 ssh-credentials: 1.11 ssh-slaves: 1.10 subversion: 2.5.4 throttle-concurrents: 1.8.4 token-macro: 1.11 translation: 1.12 view-column-plugin: 1.2 violations: 0.7.11 windows-slaves: 1.1 ws-cleanup: 0.28 xvfb: 1.1.0 The regarding jobs are two matrix configuration jobs that are triggered (in the failing case) both from pushes to the same git repository.

          Oleg Nenashev added a comment -

          Needs to be retested on the latest release

          Oleg Nenashev added a comment - Needs to be retested on the latest release

            Unassigned Unassigned
            tps800 Thomas Schweikle
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: