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

Git polling using workspace blocked until running build completes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • None
    • OS: Windows x64
      Jenkins: 2.89.3
      git-client: 2.7.1
      scm-api: 2.2.6
      jenkins-multijob-plugin: 1.28

      We have git polling enabled for a multijob project which requires the use of a local workspace as are using the "polling ignores commits with certain messages" option.  Each build for this project takes around 1 hour.

       

      If a build is running when polling triggers (either via schedule or from using the notifyCommit endpoint) it has to wait for the build that is running to finish before completing.  This significantly reduces the throughput of our builds.

       

      When looking at the Jenkins threads we see polling waiting on acquiring a workspace lock

       

      "Waiting to acquire D:\jenkins-ci-slave\workspace\CI@2 : SCM polling for com.tikal.jenkins.plugins.multijob.MultiJobProject@504afb4[CI]" Id=19074 Group=main WAITING on hudson.slaves.WorkspaceList@468cbad2
      at java.lang.Object.wait(Native Method)
      - waiting on hudson.slaves.WorkspaceList@468cbad2
      at java.lang.Object.wait(Unknown Source)
      at hudson.slaves.WorkspaceList.acquire(WorkspaceList.java:257)
      at hudson.slaves.WorkspaceList.acquire(WorkspaceList.java:236)
      at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1399)
      at hudson.model.AbstractProject._poll(AbstractProject.java:1376)
      at hudson.model.AbstractProject.poll(AbstractProject.java:1287)
      at com.tikal.jenkins.plugins.multijob.MultiJobProject.poll(MultiJobProject.java:95)
      at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:594)
      at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:640)
      at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      
      Number of locked synchronizers = 1
      - java.util.concurrent.ThreadPoolExecutor$Worker@566b1062

       

      At this point if we view the Git Polling Log for the project all we see is

      Started on Feb 14, 2018 4:44:59 PM

       

      Is there a way to have polling proceed whilst another build is in progress?

            Unassigned Unassigned
            craigpaton Craig Paton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: