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

autofavourite fails with git-client plugin and jgit 4.5.3

    XMLWordPrintable

    Details

    • Epic Link:
    • Similar Issues:

      Description

      When you run a github multibranch pipeline - it will attempt to autofavourite things based on the users email: 

      raised by tyler and codevalet, in some cases it fails with the following stacktrace.  

      (this may only show up with github oauth plugin)

       

      org.eclipse.jgit.errors.MissingObjectException: Missing commit d968d85eba1f7faaec1ab7d8b9456ab874502a42
          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.RevWalk.markStart(RevWalk.java:293)
          at org.jenkinsci.plugins.gitclient.JGitAPIImpl$4.includes(JGitAPIImpl.java:1096)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl$Invocation.replay(RemoteGitImpl.java:101)
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:151)
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
          at hudson.remoting.UserRequest.perform(UserRequest.java:181)
          at hudson.remoting.UserRequest.perform(UserRequest.java:52)
          at hudson.remoting.Request$2.run(Request.java:336)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:748)
      hudson.plugins.git.GitException: org.eclipse.jgit.errors.MissingObjectException: Missing commit d968d85eba1f7faaec1ab7d8b9456ab874502a42
          at org.jenkinsci.plugins.gitclient.JGitAPIImpl$4.includes(JGitAPIImpl.java:1100)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl$Invocation.replay(RemoteGitImpl.java:101)
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:151)
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
          at hudson.remoting.UserRequest.perform(UserRequest.java:181)
          at hudson.remoting.UserRequest.perform(UserRequest.java:52)
          at hudson.remoting.Request$2.run(Request.java:336)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:748)
      java.lang.reflect.InvocationTargetException: null
          at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl$Invocation.replay(RemoteGitImpl.java:101)
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:151)
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
          at hudson.remoting.UserRequest.perform(UserRequest.java:181)
          at hudson.remoting.UserRequest.perform(UserRequest.java:52)
          at hudson.remoting.Request$2.run(Request.java:336)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:748)
      hudson.plugins.git.GitException: java.lang.reflect.InvocationTargetException
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:156)
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
          at hudson.remoting.UserRequest.perform(UserRequest.java:181)
          at hudson.remoting.UserRequest.perform(UserRequest.java:52)
          at hudson.remoting.Request$2.run(Request.java:336)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:748)
          at ......remote call to freebsd-11-f08010
          at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1554)
          at hudson.remoting.UserResponse.retrieve(UserRequest.java:281)
          at hudson.remoting.Channel.call(Channel.java:839)
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
          at com.sun.proxy.$Proxy193.execute
          at io.jenkins.blueocean.autofavorite.FavoritingScmListener.getChangeSet(FavoritingScmListener.java:143)
          at io.jenkins.blueocean.autofavorite.FavoritingScmListener.onCheckout(FavoritingScmListener.java:73)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:132)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:90)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:77)
          at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)
          at hudson.security.ACL.impersonate(ACL.java:260)
          at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)

        Attachments

          Issue Links

            Activity

            Hide
            rtyler R. Tyler Croy added a comment -

            Rolling a build with the #266 pr from git-client-plugin appears to have resolved the issue, or at least made it stop logging.

            Show
            rtyler R. Tyler Croy added a comment - Rolling a build with the #266 pr from git-client-plugin appears to have resolved the issue, or at least made it stop logging.
            Hide
            michaelneale Michael Neale added a comment -

            right so https://github.com/jenkinsci/git-client-plugin/pull/266 implies that the jgit version has some subtle change breaking autofav... I am guessing many setups use git and don't see this exactly? 

            Show
            michaelneale Michael Neale added a comment - right so https://github.com/jenkinsci/git-client-plugin/pull/266  implies that the jgit version has some subtle change breaking autofav... I am guessing many setups use git and don't see this exactly? 
            Hide
            markewaite Mark Waite added a comment -

            As far as I can tell, the revert of JGit has no effect on the problem I'm seeing with git whatchanged. R. Tyler Croy will need to double check in his environment.

            Refer to my comments on the earlier bug.

            Show
            markewaite Mark Waite added a comment - As far as I can tell, the revert of JGit has no effect on the problem I'm seeing with git whatchanged . R. Tyler Croy will need to double check in his environment. Refer to my comments on the earlier bug.
            Hide
            michaelneale Michael Neale added a comment -

            I think git whatchanged is a cli thing, jgit is api - so not surprised it is unrelated. 

            Show
            michaelneale Michael Neale added a comment - I think git whatchanged is a cli thing, jgit is api - so not surprised it is unrelated. 
            Hide
            markewaite Mark Waite added a comment -

            They are two different implementations which perform the same function.  The git whatchanged command is used to compute a change set.  The JGit implementation uses Java calls to perform the same operation.  The problem in both cases is that the autofavorite plugin is requesting the change set associated with a SHA1 from the global plugin library, when it should be requesting the change set associated with a SHA1 from the workspace.

            Show
            markewaite Mark Waite added a comment - They are two different implementations which perform the same function.  The git whatchanged command is used to compute a change set.  The JGit implementation uses Java calls to perform the same operation.  The problem in both cases is that the autofavorite plugin is requesting the change set associated with a SHA1 from the global plugin library, when it should be requesting the change set associated with a SHA1 from the workspace.
            Hide
            jamesdumay James Dumay added a comment -

            Great work debugging here Mark Waite. We have enough to go on for a fix!

            Show
            jamesdumay James Dumay added a comment - Great work debugging here Mark Waite . We have enough to go on for a fix!
            Hide
            jglick Jesse Glick added a comment -

            Any relation to JENKINS-43400?

            Show
            jglick Jesse Glick added a comment - Any relation to JENKINS-43400 ?

              People

              • Assignee:
                jamesdumay James Dumay
                Reporter:
                michaelneale Michael Neale
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: