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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Critical Critical
    • git-plugin
    • 2.46.2
      Master: Ubuntu 16.04.2
      Slave: OS X 10.12.4

      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.

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

              Created:
              Updated:
              Resolved: