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

JacocoPublisher serializes concurrent builds waiting for checkpoint

    • 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.

          [JENKINS-24450] JacocoPublisher serializes concurrent builds waiting for checkpoint

          Code changed in jenkins
          User: Basil Crow
          Path:
          src/main/java/hudson/plugins/jacoco/JacocoBuildAction.java
          src/main/java/hudson/plugins/jacoco/JacocoProjectAction.java
          src/main/java/hudson/plugins/jacoco/JacocoPublisher.java
          src/main/java/hudson/plugins/jacoco/portlet/JacocoLoadData.java
          src/main/java/hudson/plugins/jacoco/portlet/utils/Utils.java
          http://jenkins-ci.org/commit/jacoco-plugin/a4ac13b109d85f7d26e1d758dd9c510de7e6dd90
          Log:
          JENKINS-24450 JacocoPublisher serializes concurrent builds waiting for checkpoint

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Basil Crow Path: src/main/java/hudson/plugins/jacoco/JacocoBuildAction.java src/main/java/hudson/plugins/jacoco/JacocoProjectAction.java src/main/java/hudson/plugins/jacoco/JacocoPublisher.java src/main/java/hudson/plugins/jacoco/portlet/JacocoLoadData.java src/main/java/hudson/plugins/jacoco/portlet/utils/Utils.java http://jenkins-ci.org/commit/jacoco-plugin/a4ac13b109d85f7d26e1d758dd9c510de7e6dd90 Log: JENKINS-24450 JacocoPublisher serializes concurrent builds waiting for checkpoint

          Code changed in jenkins
          User: Dominik Stadler
          Path:
          src/main/java/hudson/plugins/jacoco/JacocoBuildAction.java
          src/main/java/hudson/plugins/jacoco/JacocoProjectAction.java
          src/main/java/hudson/plugins/jacoco/JacocoPublisher.java
          src/main/java/hudson/plugins/jacoco/portlet/JacocoLoadData.java
          src/main/java/hudson/plugins/jacoco/portlet/utils/Utils.java
          http://jenkins-ci.org/commit/jacoco-plugin/68adb76583b625339418765d105d6f53e03f77dc
          Log:
          Merge pull request #45 from basil/master

          JENKINS-24450 JacocoPublisher serializes concurrent builds waiting for checkpoint

          Compare: https://github.com/jenkinsci/jacoco-plugin/compare/b1e2ad7178f9...68adb76583b6

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Dominik Stadler Path: src/main/java/hudson/plugins/jacoco/JacocoBuildAction.java src/main/java/hudson/plugins/jacoco/JacocoProjectAction.java src/main/java/hudson/plugins/jacoco/JacocoPublisher.java src/main/java/hudson/plugins/jacoco/portlet/JacocoLoadData.java src/main/java/hudson/plugins/jacoco/portlet/utils/Utils.java http://jenkins-ci.org/commit/jacoco-plugin/68adb76583b625339418765d105d6f53e03f77dc Log: Merge pull request #45 from basil/master JENKINS-24450 JacocoPublisher serializes concurrent builds waiting for checkpoint Compare: https://github.com/jenkinsci/jacoco-plugin/compare/b1e2ad7178f9...68adb76583b6

          centic added a comment -

          Applied pull request, will be included in next release, thanks for the patch!

          centic added a comment - Applied pull request, will be included in next release, thanks for the patch!

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

              Created:
              Updated:
              Resolved: