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

Branch Indexing fails with MissingObjectException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • None
    • core:2.107.1
      git:3.8
      git-client:2.7.1 and git-client:3.0.0-beta

      Issue

      Branch indexing is sometimes failing with an exception like the following:

      ERROR: [Tue Mar 20 14:12:32 CET 2018] Could not fetch branches from source c77cfbf8-6ad9-4714-9ad2-07e4d80f2b2c 
      org.eclipse.jgit.errors.MissingObjectException: Missing unknown 86aea335051269d6d5944b6067e7b4ccaa747f2b 
      at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:158) 
      at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:227) 
      at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:859) 
      at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:772) 
      at jenkins.plugins.git.AbstractGitSCMSource$8$2.create(AbstractGitSCMSource.java:572) 
      at jenkins.plugins.git.AbstractGitSCMSource$8$2.create(AbstractGitSCMSource.java:566) 
      at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:341) 
      at jenkins.plugins.git.AbstractGitSCMSource$8.discoverBranches(AbstractGitSCMSource.java:557) 
      at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:535) 
      at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:521) 
      at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:352) 
      at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:521) 
      at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:355) 
      at jenkins.scm.api.SCMSource.fetch(SCMSource.java:265) 
      at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634) 
      at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276) 
      at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165) 
      at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:978) 
      at hudson.model.ResourceController.execute(ResourceController.java:97) 
      at hudson.model.Executor.run(Executor.java:421) 
      

      Now something that I notice here is that the indexing starts at 14:10:00 CET and the error happens at 14:12:32. It seems that the revision 86aea335051269d6d5944b6067e7b4ccaa747f2b was not present at the time the changes were fetched (~2m earlier).

      Digging further, *this happens when a commit happens during branch indexing.*

      How To Reproduce

      My Scenario:

      • Pipeline Multibranch
      • SCM Source Git SCM
      • Large repository with lot of branches (200 branches): first fetch takes > 15m
      • Filter to include 20 branches

      This issue is reproducible by triggering branch indexing and committing to one of the included branches simultaneously. I can reproduce almost constantly by doing this.

            rsandell rsandell
            allan_burdajewicz Allan BURDAJEWICZ
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: