We've been noticing problems with our jenkins branch indexing, which seems to hang from several minutes to hours. We see a lot of Branch indexing jobs on the queue and in the Branch indexing log itself, it shows (what we believe) a complete log with a loading spinner gif at the end.

      Not sure what the error is. Would be happy to dig in and provide more info if needed.

      Jenkins version: 2.7.1

      Installed Plugins:
      Ant Plugin - 1.3
      Authentication Tokens API Plugin - 1.3
      Branch API Plugin - 1.10
      build timeout plugin - 1.17
      CloudBees Docker Pipeline - 1.6
      Credentials Plugin - 2.1.4
      CVS Plug-in - 2.12
      Docker Commons Plugin - 1.4.0
      Durable Task Plugin - 1.11
      External Monitor Job Type Plugin - 1.5
      Folders Plugin - 5.12
      Git client plugin - 1.19.6
      Git plugin - 2.5.2
      GIT server Plugin - 1.7
      GitHub API Plugin - 1.76
      GitHub Branch Source Plugin - 1.8.1
      GitHub Organization Folder Plugin - 1.3
      GitHub plugin - 1.19.2
      Google Login Plugin - 1.2.1
      Icon Shim Plugin - 2.0.3
      Javadoc Plugin - 1.4
      JavaScript GUI Lib: ACE Editor bundle plugin - 1.1
      JavaScript GUI Lib: Handlebars bundle plugin - 1.1.1
      JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin - 1.2.1
      JavaScript GUI Lib: Moment.js bundle plugin - 1.1.1
      JUnit Plugin - 1.15
      LDAP Plugin - 1.12
      Mailer Plugin - 1.17
      MapDB API Plugin - 1.0.9.0
      Matrix Authorization Strategy Plugin - 1.4
      Matrix Project Plugin - 1.7.1
      Maven Integration plugin - 2.13
      OWASP Markup Formatter Plugin - 1.5
      PAM Authentication plugin - 1.3
      Pipeline - 2.2
      Pipeline: API - 2.1
      Pipeline: Basic Steps - 2.0
      Pipeline: Build Step - 2.2
      Pipeline: Groovy - 2.9
      Pipeline: Input Step - 2.0
      Pipeline: Job - 2.3
      Pipeline: Multibranch - 2.8
      Pipeline: Nodes and Processes - 2.3
      Pipeline: REST API Plugin - 1.5
      Pipeline: SCM Step - 2.2
      Pipeline: Shared Groovy Libraries - 2.1
      Pipeline: Stage Step - 2.1
      Pipeline: Stage View Plugin - 1.5
      Pipeline: Step API - 2.2
      Pipeline: Supporting APIs - 2.2
      Plain Credentials Plugin - 1.2
      Role-based Authorization Strategy - 2.3.2
      SCM API Plugin - 1.2
      Script Security Plugin - 1.21
      Simple Theme Plugin - 0.3
      Slack Notification Plugin - 2.0.1
      SSH Credentials Plugin - 1.12
      SSH Slaves plugin - 1.11
      Structs Plugin - 1.2
      Subversion Plug-in - 2.6
      ThinBackup - 1.7.4
      Timestamper - 1.8.4
      Token Macro Plugin - 1.12.1
      Translation Assistance plugin - 1.15
      Windows Slaves Plugin - 1.1

          [JENKINS-36724] Branch indexing hangs

          Shauvik Roy Choudhary created issue -

          Mandeep kumar added a comment - - edited

          I am facing the similar issue and even try to kill these threads ,does not work. Almost every other day ,i am facing this issue.

          Mandeep kumar added a comment - - edited I am facing the similar issue and even try to kill these threads ,does not work. Almost every other day ,i am facing this issue.
          Mandeep kumar made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]

          Thomas Johansen added a comment - - edited

          It seems like I am having the same issue as well, with version 2.13. I have three branch indexing jobs against three GitHub repositories hanging more than three days now. The three logs all say the same:

          Started by timer
          Setting origin to https://github.com/###/########
          Fetching origin...
          

          I am not able to stop the jobs either.

          Here's my plugin list:

          ace-editor:1.1
          ant:1.3
          antisamy-markup-formatter:1.5
          branch-api:1.10
          build-timeout:1.17
          cloudbees-folder:5.12
          credentials-binding:1.8
          credentials:2.1.4
          durable-task:1.11
          email-ext:2.44
          external-monitor-job:1.5
          git-client:1.19.6
          git-server:1.7
          git:2.5.2
          handlebars:1.1.1
          icon-shim:2.0.3
          javadoc:1.4
          jquery-detached:1.2.1
          junit:1.15
          mailer:1.17
          mapdb-api:1.0.9.0
          matrix-auth:1.4
          matrix-project:1.7.1
          momentjs:1.1.1
          pipeline-build-step:2.2
          pipeline-input-step:2.0
          pipeline-rest-api:1.5
          pipeline-stage-step:2.1
          pipeline-stage-view:1.5
          plain-credentials:1.2
          scm-api:1.2
          script-security:1.21
          ssh-credentials:1.12
          ssh-slaves:1.11
          structs:1.2
          timestamper:1.8.4
          token-macro:1.12.1
          windows-slaves:1.1
          workflow-aggregator:2.2
          workflow-api:2.1
          workflow-basic-steps:2.0
          workflow-cps-global-lib:2.1
          workflow-cps:2.9
          workflow-durable-task-step:2.3
          workflow-job:2.3
          workflow-multibranch:2.8
          workflow-scm-step:2.2
          workflow-step-api:2.2
          workflow-support:2.2
          ws-cleanup:0.29
          

          Thomas Johansen added a comment - - edited It seems like I am having the same issue as well, with version 2.13. I have three branch indexing jobs against three GitHub repositories hanging more than three days now. The three logs all say the same: Started by timer Setting origin to https://github.com/###/######## Fetching origin... I am not able to stop the jobs either. Here's my plugin list: ace-editor:1.1 ant:1.3 antisamy-markup-formatter:1.5 branch-api:1.10 build-timeout:1.17 cloudbees-folder:5.12 credentials-binding:1.8 credentials:2.1.4 durable-task:1.11 email-ext:2.44 external-monitor-job:1.5 git-client:1.19.6 git-server:1.7 git:2.5.2 handlebars:1.1.1 icon-shim:2.0.3 javadoc:1.4 jquery-detached:1.2.1 junit:1.15 mailer:1.17 mapdb-api:1.0.9.0 matrix-auth:1.4 matrix-project:1.7.1 momentjs:1.1.1 pipeline-build-step:2.2 pipeline-input-step:2.0 pipeline-rest-api:1.5 pipeline-stage-step:2.1 pipeline-stage-view:1.5 plain-credentials:1.2 scm-api:1.2 script-security:1.21 ssh-credentials:1.12 ssh-slaves:1.11 structs:1.2 timestamper:1.8.4 token-macro:1.12.1 windows-slaves:1.1 workflow-aggregator:2.2 workflow-api:2.1 workflow-basic-steps:2.0 workflow-cps-global-lib:2.1 workflow-cps:2.9 workflow-durable-task-step:2.3 workflow-job:2.3 workflow-multibranch:2.8 workflow-scm-step:2.2 workflow-step-api:2.2 workflow-support:2.2 ws-cleanup:0.29
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 173456 ] New: JNJira + In-Review [ 185134 ]
          Shauvik Roy Choudhary made changes -
          Attachment New: branch-indexing-hangs-2.png [ 33499 ]

          Shauvik Roy Choudhary added a comment - - edited

          After a few days there are so many "Branch Indexing" messages that it fills up the screen and doesn't process new PRs anymore.

          Jenkins needs to be restarted for this to be bypassed.

          Shauvik Roy Choudhary added a comment - - edited After a few days there are so many "Branch Indexing" messages that it fills up the screen and doesn't process new PRs anymore. Jenkins needs to be restarted for this to be bypassed.
          Shauvik Roy Choudhary made changes -
          Rank New: Ranked higher

          Jesse Glick added a comment -

          Unless the branch indexing log makes it clear why indexing is blocked, you would need to look in a Jenkins thread dump to see the cause of the issue.

          Jesse Glick added a comment - Unless the branch indexing log makes it clear why indexing is blocked, you would need to look in a Jenkins thread dump to see the cause of the issue.

          Please verify if this issue is an issue with GitHub Branch Source 2.0.0-beta-1 (available from the experimental update center now or 2.0.0 (available in early January 2017)

          Stephen Connolly added a comment - Please verify if this issue is an issue with GitHub Branch Source 2.0.0-beta-1 (available from the experimental update center now or 2.0.0 (available in early January 2017)

            jglick Jesse Glick
            shauvik Shauvik Roy Choudhary
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: