Build triggers on bitbucket PRs leads to MissingObjectException: Missing unknown {HASH} after upgrading to LTS 2.6.0

50 views
Skip to first unread message

Ahmed Hosni

unread,
Sep 13, 2017, 6:44:30 PM9/13/17
to Jenkins Users
Hi all,

After upgrading to Jenkins 2.60.2 (with git client plugin 2.5.0 and git-plugin from 3.5.1), we noticed a JGit issue whith multibranch pipeline trying to fetch the git reference matching the latest Pull Request from Bitbucket, here is the stacktrace:

[Bitbucket] Build result notified
org.eclipse.jgit.errors.MissingObjectException: Missing unknown 448a6f19a4cf288969715abf248eddd174db63a7
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 hudson.plugins.git.util.RevCommitRepositoryCallback.invoke(RevCommitRepositoryCallback.java:25)
at hudson.plugins.git.util.RevCommitRepositoryCallback.invoke(RevCommitRepositoryCallback.java:13)
at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.withRepository(AbstractGitAPIImpl.java:29)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.withRepository(CliGitAPIImpl.java:71)
at hudson.plugins.git.GitSCM.printCommitMessageToLog(GitSCM.java:1195)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1159)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:130)
at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:120)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:263)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:405)

In the other and, the mentionned sha1 exists and git fsck does not report any corruption symptoms. Moreover, C-git (installed on the agent) is able to fetch this sha1.

The issue and the stacktrace we've got are too close to what was reported in the link below:

However, the fix provided right there is more for another problem with git submodules rather than PRs.

Could you please advise ?
Thank you. 

Mark Waite

unread,
Sep 13, 2017, 6:53:49 PM9/13/17
to Jenkins Users
You're seeing a stack trace that is not related to submodules, thus is not fixed by the change that resolved JENKINS-45729.  However, that stack trace is being discussed in JENKINS-45729.

In that bug report, one of the late comments points to a pending pull request which attempts to resolve the issue by ignoring any exception from the printCommitMessageToLog method.

Since I can't duplicate the problem, I made that change "blindly".  The user who was reporting a problem similar to the problem you're seeing (Adam Zovits), has not reported if the most recent change I made resolved the issue for him.  An earlier change did not completely resolve the issue, so I did not merge the pull request into the git plugin.

You could try the same pull request with its latest build ( git.hpi from https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fgit-plugin/detail/PR-530/5/artifacts/ ) and report in the comments of JENKINS-45729 if that avoids the problem you're seeing.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9e757f8a-d203-4091-a89f-97bb7d091060%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages