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

"MissingObjectException: Missing commit" - no issues reported by git binary



    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Component/s: git-plugin
    • Labels:
    • Environment:
      Master: Ubuntu 16.04.2
      Slave: OS X 10.12.4
    • Similar Issues:


      We are trying to move our build system to use the Github hook APIs rather than being based on a periodic build, however, we can't get our repository to check out when the hook is fired. 

      When the hook is fired, Jenkins checks for changes to the repo. This fails with the error:

      org.eclipse.jgit.errors.MissingObjectException: Missing commit [some commit hash]
      at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:159)
      at org.eclipse.jgit.revwalk.RevWalk.getCachedBytes(RevWalk.java:903)
      at org.eclipse.jgit.revwalk.RevCommit.parseHeaders(RevCommit.java:155)
      at org.eclipse.jgit.revwalk.PendingGenerator.next(PendingGenerator.java:147)
      at org.eclipse.jgit.revwalk.StartGenerator.next(StartGenerator.java:184)
      at org.eclipse.jgit.revwalk.RevWalk.next(RevWalk.java:435)


      This happens every time we get a hook call, and it fails on the same commit. I checked the commit to make sure it exists and that there was nothing weird about it. I ran `git fsck --full --strict` and there was nothing about this commit, just a few dangling ones. 

      However, when I changed the global configuration to change the git tool from `git` to `/usr/local/bin/git` (The homebrew version - I'm sure /usr/bin/git would also work), the check succeeds and changes are detected, kicking off a build. The problem is that when the build starts, and it does its git operations, I get the same crash as above in jgit.

      This is a total blocker for us since we can't even do the clone, let alone a build.



          dalemy Dale Myers created issue -
          markewaite Mark Waite made changes -
          Field Original Value New Value
          Assignee Mark Waite [ markewaite ]
          integer Kanstantsin Shautsou made changes -
          Component/s github-plugin [ 15896 ]


            Unassigned Unassigned
            dalemy Dale Myers
            0 Vote for this issue
            6 Start watching this issue