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

JacocoPublisher serializes concurrent builds waiting for checkpoint

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • jacoco-plugin
    • None
    • Jenkins 1.576
      JaCoCo 1.0.16

      Problem:

      When running concurrent builds of a job, each build blocks with the message "Record JaCoCo coverage report is waiting for a checkpoint" until all the builds preceding it have completed. In other words, if an older build takes a long time to finish, a newer build will hang with the above message until the older build has completed.

      Cause:

      See JENKINS-9913 for a detailed description of the cause. Earlier versions of Jenkins could not run multiple builds of the same job in parallel. As a result, many plugins written for earlier versions of Jenkins always assumed that the outcome of the previous build is completely available, which is no longer true when we do concurrent builds. The BuildStep.getRequiredMonitorService() method was introduced for preserving compatibility with plugins written for earlier versions of Jenkins. BuildStepMonitor.BUILD means that the BuildStep is only executed after the previous build is fully completed (thus fully restoring the earlier semantics of one build at a time), while BuildStepMonitor.NONE (the recommended value for newer plugins) performs no external synchronization on the build step.

      Solution:

      In order to resolve this issue, we need to switch from BuildStepMonitor.BUILD to BuildStepMonitor.NONE. This necessitates auditing the code for the assumption that all previous builds have completed and making the necessary adjustments.

            centic centic
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: