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.

       

          [JENKINS-69156] build step case dead lock

          We are often in this situation. It's very annoying . It cannot be a solution to increase the number of executors beyond the recommended level to avoid the problem.

          Andre Schlegel added a comment - We are often in this situation. It's very annoying . It cannot be a solution to increase the number of executors beyond the recommended level to avoid the problem.

          Artistic added a comment -

          DadeSchools is the online portal for Miami-Dade County Public Schools (M-DCPS), one of the largest school districts in the U.S. It allows students, parents, and teachers to access academic resources, grades, attendance, and important updates. Users can log in to manage coursework, communicate with teachers, and track progress. The platform enhances digital learning and simplifies school administration, making education more accessible and efficient for the community.

          Artistic added a comment - DadeSchools is the online portal for Miami-Dade County Public Schools (M-DCPS), one of the largest school districts in the U.S. It allows students, parents, and teachers to access academic resources, grades, attendance, and important updates. Users can log in to manage coursework, communicate with teachers, and track progress. The platform enhances digital learning and simplifies school administration, making education more accessible and efficient for the community.

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

              Created:
              Updated: