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

After Jenkins and Git plugin upgrade, jobs failing with "FATAL: Error computing merge base"

      The issue occurred after an upgrade to the latest LTS version 2.46.2, and upgrading the plugins to be compatible with that version.

       

      We noticed that the jobs that had "**" (without quotes) in Git's field "Branch Specifier (blank for 'any')" started failing with the following error:

       

      FATAL: Error computing merge base
      java.lang.NoSuchMethodError: org.eclipse.jgit.revwalk.RevWalk.release()V
        at hudson.plugins.git.util.GitUtils$1.invoke(GitUtils.java:176)
        at hudson.plugins.git.util.GitUtils$1.invoke(GitUtils.java:127)
        at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.withRepository(AbstractGitAPIImpl.java:29)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.withRepository(CliGitAPIImpl.java:64)
        at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:884)
        at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:859)
        at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:818)
        at hudson.remoting.UserRequest.perform(UserRequest.java:152)
        at hudson.remoting.UserRequest.perform(UserRequest.java:50)
        at hudson.remoting.Request$2.run(Request.java:332)
        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 hudson.remoting.Engine$1$1.run(Engine.java:85)
        at java.lang.Thread.run(Thread.java:745)
        at ......remote call to Channel to /10.228.220.23(Native Method)
        at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
        at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
        at hudson.remoting.Channel.call(Channel.java:830)
      Caused: java.io.IOException: Remote call on Channel to /10.228.220.23 failed
        at hudson.remoting.Channel.call(Channel.java:838)
        at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:257)
        at com.sun.proxy.$Proxy58.withRepository(Unknown Source)
        at org.jenkinsci.plugins.gitclient.RemoteGitImpl.withRepository(RemoteGitImpl.java:235)
        at hudson.plugins.git.util.GitUtils.filterTipBranches(GitUtils.java:127)
      Caused: hudson.plugins.git.GitException: Error computing merge base
        at hudson.plugins.git.util.GitUtils.filterTipBranches(GitUtils.java:188)
        at hudson.plugins.git.util.DefaultBuildChooser.getAdvancedCandidateRevisions(DefaultBuildChooser.java:249)
        at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:53)
        at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:951)
        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1054)
        at hudson.scm.SCM.checkout(SCM.java:496)
        at hudson.model.AbstractProject.checkout(AbstractProject.java:1281)
        at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
        at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
        at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
        at hudson.model.Run.execute(Run.java:1728)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at hudson.model.ResourceController.execute(ResourceController.java:98)
        at hudson.model.Executor.run(Executor.java:405)
      Notifying upstream projects of job completion
      Finished: FAILURE

       

      This bug can be reproduced by creating a job that uses the git plugin, configuring it with a git

      repo, and in the "Branch Specifier (blank for 'any')" specify "**" without quotes or leave it empty.

       

      We found a workaround by including the "**" in single or double quotes, but fixing this bug will be more convenient because we have thousands of jobs and it will be hard to go through them one by one to change their configuration.

          [JENKINS-44272] After Jenkins and Git plugin upgrade, jobs failing with "FATAL: Error computing merge base"

          Mark Waite added a comment -

          This bug was fixed in git plugin 3.0.0, released 10 Sep 2016.

          The release() call was a temporary solution during the transition from git client plugin 1.x to git client plugin 2.x. Since that transition is now complete, the release() call was removed in git plugin 3.0.0.

          The JGit libraries used in git client plugin 1.x are not binary compatible with the JGit libraries used in git client plugin 2.x, so that work-around was used for a time. Unfortunately, there were cases (like this) where a class not found exception would be reported.

          Mark Waite added a comment - This bug was fixed in git plugin 3.0.0 , released 10 Sep 2016. The release() call was a temporary solution during the transition from git client plugin 1.x to git client plugin 2.x. Since that transition is now complete, the release() call was removed in git plugin 3.0.0. The JGit libraries used in git client plugin 1.x are not binary compatible with the JGit libraries used in git client plugin 2.x, so that work-around was used for a time. Unfortunately, there were cases (like this) where a class not found exception would be reported.

            markewaite Mark Waite
            binary_snake Tarek Zioune
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: