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

build step case dead lock

XMLWordPrintable

      Using build step to trigger other jobs and wait could cause the dead lock.

       

      Below presudo code of JobA:

      pipeline
      {
        stages
        {
          stage('test')
          {
             build job: "JobB", wait: true
          }
        }
      } 

       

      Here is the the example of use case problems:

      • Let assume we have 2 executors
      • JobA buildnumber#1 running (holding 1st executor) try trigger JobB.#1
      • JobA buildnumber#2 also already running (holding 2nd executor) try trigger JobB.#2

       

      The problem: we have a dead block. JobB.1 and JobB.2 are both wait for JobA.1 or JobA.2 finished for obtain executor(s). But JobA.1 and JobA.2 are waiting for JobB.1 and JobB.2 to finished.

       

      Suggested solution: When a Job waiting for other jobs, it would be better to temporary release the executor, and obtain it back when it wait condition satisfy.

       

            Unassigned Unassigned
            nhatkhai NhatKhai Nguyen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: