This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      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.

       

            Assignee:
            praneeth
            Reporter:
            NhatKhai Nguyen
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: