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

Error computing merge base due to NotSerializableException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • git-plugin
    • None
    • jenkins 2.263.1
      git-plugin 4.5.2

      We are checking out a repository with submodules in a multibranch pipeline using the following script:

      checkout([
      	$class: 'GitSCM',
      	branches: scm.branches,
      	doGenerateSubmoduleConfigurations: true,
      	extensions: scm.extensions + [[$class: 'SubmoduleOption', recursiveSubmodules: true]],
      	userRemoteConfigs: scm.userRemoteConfigs
      ])
      

      This however fails with the following error:

      java.io.NotSerializableException: java.util.HashMap$Values
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
      	at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1378)
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
      	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
      	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
      	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      	at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1378)
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
      	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
      	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
      	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
      	at hudson.remoting.UserRequest._serialize(UserRequest.java:263)
      	at hudson.remoting.UserRequest.serialize(UserRequest.java:272)
      Caused: java.io.IOException: Unable to serialize UserRPCRequest:org.jenkinsci.plugins.gitclient.GitClient.withRepository[org.jenkinsci.plugins.gitclient.RepositoryCallback](44)
      	at hudson.remoting.UserRequest.serialize(UserRequest.java:274)
      	at hudson.remoting.UserRequest.<init>(UserRequest.java:101)
      	at hudson.remoting.Channel.call(Channel.java:996)
      	at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:285)
      	at com.sun.proxy.$Proxy78.withRepository(Unknown Source)
      	at org.jenkinsci.plugins.gitclient.RemoteGitImpl.withRepository(RemoteGitImpl.java:237)
      	at hudson.plugins.git.util.GitUtils.filterTipBranches(GitUtils.java:215)
      Caused: hudson.plugins.git.GitException: Error computing merge base
      	at hudson.plugins.git.util.GitUtils.filterTipBranches(GitUtils.java:268)
      	at hudson.plugins.git.SubmoduleCombinator.createSubmoduleCombinations(SubmoduleCombinator.java:41)
      	at hudson.plugins.git.extensions.impl.SubmoduleOption.onCheckoutCompleted(SubmoduleOption.java:182)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1379)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:125)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      	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:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      

      Interestingly the error does not occur when the submodules are not checked out or doGenerateSubmoduleConfigurations is set to false.

            markewaite Mark Waite
            kadam Adam Kapos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: