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

"Found match against..." hangs at non-existent repo

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • branch-api-plugin
    • None

      Hi,

      We are trying to trigger multibranch jobs (via cloudbees-bitbucket-branch-source), and it is failing for jobs that are lower in alphanumeric order. Affected jobs' multibranch pipeline events page just shows: "No events as of Sat May 22 09:39:30 BST 2021, waiting for events..." and they do not start.

      Inspecting jenkins.branch.MultiBranchProject.log shows:

      [Sat May 22 11:07:29 BST 2021] Received com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookConsumer$BitbucketSCMHeadEvent UPDATED event from job40 with timestamp Sat May 22 11:07:29 BST 2021
       Found match against job1
       Found match against job2
       Found match against job3
       ....
       Found match against job36

      Upon inspecting job36, we noticed the git repo in its config does not exist.  And when we disabled this job, the "Found match ..." lines proceeded past this and processed the rest of the jobs, including the one we wanted to trigger (job40), which started successfully.

      branch-api-plugin should tolerate such misconfigured jobs that have a non-existent repo, and not block jobs after it triggering. This might have also been the cause of JENKINS-63815.  We are on branch-api-plugin v2.6.3 & Jenkins v2.277.4

      Many thanks

          [JENKINS-65696] "Found match against..." hangs at non-existent repo

          Brendan Holmes added a comment - - edited

          If it's any help, here's the thread dump while the "Found match..." list is being processed:

          "class com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookConsumer$BitbucketSCMHeadEvent Sat May 22 11:34:05 BST 2021 / SCMEvent 5
          "class com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookConsumer$BitbucketSCMHeadEvent Sat May 22 11:34:05 BST 2021 / SCMEvent 5" Id=54952 Group=main WAITING on java.lang.UNIXProcess@31e15b21
          at java.lang.Object.wait(Native Method)
           - waiting on java.lang.UNIXProcess@31e15b21 at java.lang.Object.wait(Object.java:502) at java.lang.UNIXProcess.waitFor(UNIXProcess.java:395) at hudson.Proc$LocalProc.join(Proc.java:327) at hudson.Proc.joinWithTimeout(Proc.java:172) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2443) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2051) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:84) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:573) at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:580) at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:566) at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:372) at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:566) at com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCMSource$CustomGitSCMSource.accessibleRetrieve(BitbucketSCMSource.java:505) at com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCMSource.retrieve(BitbucketSCMSource.java:231) at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:327) at jenkins.branch.MultiBranchProject$SCMEventListenerImpl.processHeadUpdate(MultiBranchProject.java:1681) at jenkins.branch.MultiBranchProject$SCMEventListenerImpl.onSCMHeadEvent(MultiBranchProject.java:1190) at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:246) at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:229) at jenkins.scm.api.SCMEvent$Dispatcher.run(SCMEvent.java:505) at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:67) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Number of locked synchronizers = 2 - java.util.concurrent.locks.ReentrantLock$NonfairSync@72f4c5ba - java.util.concurrent.ThreadPoolExecutor$Worker@49beb824

          Looks like it calls gitclient. Does this have a timeout that can be set?

          Brendan Holmes added a comment - - edited If it's any help, here's the thread dump while the "Found match..." list is being processed: "class com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookConsumer$BitbucketSCMHeadEvent Sat May 22 11:34:05 BST 2021 / SCMEvent 5 "class com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookConsumer$BitbucketSCMHeadEvent Sat May 22 11:34:05 BST 2021 / SCMEvent 5 " Id=54952 Group=main WAITING on java.lang.UNIXProcess@31e15b21 at java.lang.Object.wait(Native Method)  - waiting on java.lang.UNIXProcess@31e15b21 at java.lang.Object.wait(Object.java:502) at java.lang.UNIXProcess.waitFor(UNIXProcess.java:395) at hudson.Proc$LocalProc.join(Proc.java:327) at hudson.Proc.joinWithTimeout(Proc.java:172) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2443) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2051) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:84) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:573) at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:580) at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:566) at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:372) at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:566) at com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCMSource$CustomGitSCMSource.accessibleRetrieve(BitbucketSCMSource.java:505) at com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCMSource.retrieve(BitbucketSCMSource.java:231) at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:327) at jenkins.branch.MultiBranchProject$SCMEventListenerImpl.processHeadUpdate(MultiBranchProject.java:1681) at jenkins.branch.MultiBranchProject$SCMEventListenerImpl.onSCMHeadEvent(MultiBranchProject.java:1190) at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:246) at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:229) at jenkins.scm.api.SCMEvent$Dispatcher.run(SCMEvent.java:505) at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:67) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Number of locked synchronizers = 2 - java.util.concurrent.locks.ReentrantLock$NonfairSync@72f4c5ba - java.util.concurrent.ThreadPoolExecutor$Worker@49beb824 Looks like it calls gitclient. Does this have a timeout that can be set?

            Unassigned Unassigned
            brendanh Brendan Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: