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

'Do not allow concurrent builds' in pipeline sometimes fails

      We noticed (every now and then) that some of our pipelines had issues. It appeared as if some jobs started while a previous pipeline was still ongoing (and the 'Do not allow concurrent builds' check was on).

      One of our developers wrote a script to check for this type of failure and got:

      PROBLEM: build 29319 started before build 29318 finished! (2017-08-31 13:42:41.952000 <= 2017-08-31 13:47:05.655000)

      PROBLEM: build 38584 started before build 38583 finished! (2017-10-25 13:54:31.601000 <= 2017-10-25 15:27:10.468000)

      PROBLEM: build 39219 started before build 39218 finished! (2018-01-02 08:01:47.422000 <= 2018-01-02 08:13:07.537000)

      PROBLEM: build 40171 started before build 40170 finished! (2018-02-15 14:58:57.194000 <= 2018-02-15 15:35:27.225000)

      PROBLEM: build 40356 started before build 40355 finished! (2018-02-23 13:31:02.287000 <= 2018-02-23 14:00:22.545000)

       

      We went over the times our Job DSL seed job ran and noticed a Job DSL seed job run ran every time the issue occurred.
      I tried to reproduce it with a simple 'sleep' pipeline, but the issue appears to require a more advanced pipeline (perhaps it only gets triggered when going from one step to another?).

          [JENKINS-49820] 'Do not allow concurrent builds' in pipeline sometimes fails

          Mathias De Maré created issue -
          Mathias De Maré made changes -
          Description Original: We noticed (every now and then) that some of our pipelines had issues. It appeared as if some jobs started while a previous pipeline was still ongoing (and the 'Do not allow concurrent builds' check was on).

          One of our developers wrote a script to check for this type of failure and got:

          PROBLEM: build 29319 started before build 29318 finished! (2017-08-31 13:42:41.952000 <= 2017-08-31 13:47:05.655000)

          PROBLEM: build 38584 started before build 38583 finished! (2017-10-25 13:54:31.601000 <= 2017-10-25 15:27:10.468000)

          PROBLEM: build 39219 started before build 39218 finished! (2018-01-02 08:01:47.422000 <= 2018-01-02 08:13:07.537000)

          PROBLEM: build 40171 started before build 40170 finished! (2018-02-15 14:58:57.194000 <= 2018-02-15 15:35:27.225000)

          PROBLEM: build 40356 started before build 40355 finished! (2018-02-23 13:31:02.287000 <= 2018-02-23 14:00:22.545000)

           

          We went over the times Job DSL ran and noticed a Job DSL run ran every time the issue occurred.
          I tried to reproduce it with a simple 'sleep' pipeline, but the issue appears to require a more advanced pipeline (perhaps it only gets triggered when going from one step to another?).
          New: We noticed (every now and then) that some of our pipelines had issues. It appeared as if some jobs started while a previous pipeline was still ongoing (and the 'Do not allow concurrent builds' check was on).

          One of our developers wrote a script to check for this type of failure and got:

          PROBLEM: build 29319 started before build 29318 finished! (2017-08-31 13:42:41.952000 <= 2017-08-31 13:47:05.655000)

          PROBLEM: build 38584 started before build 38583 finished! (2017-10-25 13:54:31.601000 <= 2017-10-25 15:27:10.468000)

          PROBLEM: build 39219 started before build 39218 finished! (2018-01-02 08:01:47.422000 <= 2018-01-02 08:13:07.537000)

          PROBLEM: build 40171 started before build 40170 finished! (2018-02-15 14:58:57.194000 <= 2018-02-15 15:35:27.225000)

          PROBLEM: build 40356 started before build 40355 finished! (2018-02-23 13:31:02.287000 <= 2018-02-23 14:00:22.545000)

           

          We went over the times our Job DSL seed job ran and noticed a Job DSL seed job run ran every time the issue occurred.
           I tried to reproduce it with a simple 'sleep' pipeline, but the issue appears to require a more advanced pipeline (perhaps it only gets triggered when going from one step to another?).
          Mathias De Maré made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          Daniel Spilker made changes -
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Daniel Spilker made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

          Mathias De Maré added a comment - Could this be the same as https://issues.jenkins-ci.org/browse/JENKINS-41127 ?

          Mathias De Maré added a comment - - edited

          This issue popped up again in the past week Is there any additional information that could help?

           

          Currently, we are running:

          • Jenkins 2.110
          • Job DSL 1.69
          • Pipeline 2.5

          Mathias De Maré added a comment - - edited This issue popped up again in the past week Is there any additional information that could help?   Currently, we are running: Jenkins 2.110 Job DSL 1.69 Pipeline 2.5
          Mathias De Maré made changes -
          Resolution Original: Cannot Reproduce [ 5 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]

          Hi even we are facing this issue , any solution for this bug will help us

          Thanks

          suryatej yaramada added a comment - Hi even we are facing this issue , any solution for this bug will help us Thanks

          Hubert Li added a comment - - edited

          I got the same issue now and then. My DSL seed job is set concurrentBuild false.

          pipelineJob(jobName)
          {
              concurrentBuild(false)
          
          ...

          The pipeline job configured correctly with "Do not allow concurrent builds" on, but it builds two jobs parallel.

          My environment:

          • Jenkins 2.60.1
          • Job DSL 1.63
          • Pipeline 2.5

          Hubert Li added a comment - - edited I got the same issue now and then. My DSL seed job is set concurrentBuild false. pipelineJob(jobName) {     concurrentBuild( false ) ... The pipeline job configured correctly with "Do not allow concurrent builds" on, but it builds two jobs parallel. My environment: Jenkins 2.60.1 Job DSL 1.63 Pipeline 2.5

            daspilker Daniel Spilker
            mathiasdm Mathias De Maré
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: