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

SCM Checkout: java.lang.ArrayIndexOutOfBoundsException: -1

    Details

    • Similar Issues:
    • Released As:
      repo 1.11.0, workflow-scm-step 2.10

      Description

      After an update of a couple of plugins yesterday,

      SCM checkout fails for Gerrit Repo.

      if changelog is set to true:

      java.lang.ArrayIndexOutOfBoundsException: -1
      	at com.thoughtworks.xstream.core.util.FastStack.pop(FastStack.java:42)
      	at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:125)
      	at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:103)
      	at com.thoughtworks.xstream.io.xml.XppReader.<init>(XppReader.java:63)
      	at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:54)
      	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1044)
      	at hudson.plugins.repo.ChangeLog.parse(ChangeLog.java:79)
      	at hudson.plugins.repo.ChangeLog.parse(ChangeLog.java:59)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:835)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1100(WorkflowRun.java:133)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1100)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:140)
      	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)
      

      if changelog is set to false:

      Similar exception without a stacktrace:

      ...
      
      00:03:19.618  Added a project: packages/apps/CMFileManager at revision: e65455f23ed00b7cddebb7bd21991363a944ba75
      00:03:19.618  Added a project: external/can-utils at revision: 47f2e7a180e50ee998f2e6aea45884f84042c4fa
      00:03:19.618  Added a project: external/i2c-tools at revision: b1bef14300a951d0a5ba02a43a05977bb5624fda
      00:03:19.618  Manifest at revision: 48405e81e6b420fede221c0922afd26b444cd61e
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // timestamps
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      [BFA] Scanning build for known causes...
      [BFA] No failure causes found
      [BFA] Done. 0s
      java.lang.ArrayIndexOutOfBoundsException
      Finished: FAILURE
      

      Git checkout works as expected.

      I first reverted

      • Pipeline: Step API -> 2.19
      • Pipeline: SCM Step -> 2.8
        Did not help, though. Next, I will downgrade everything I updated yesterday.

        Attachments

          Issue Links

            Activity

            Hide
            willi1s Simon Williams added a comment -

            I have added a pull request to the jenkinsci/repo-plugin repository to work around this issue:

            https://github.com/jenkinsci/repo-plugin/pull/56

            Show
            willi1s Simon Williams added a comment - I have added a pull request to the jenkinsci/repo-plugin repository to work around this issue: https://github.com/jenkinsci/repo-plugin/pull/56
            Hide
            lsoest Laurent Soest added a comment -

            I think the problem was fixed and released in the repo plugin.
            https://github.com/jenkinsci/repo-plugin/pull/54

            Show
            lsoest Laurent Soest added a comment - I think the problem was fixed and released in the repo plugin. https://github.com/jenkinsci/repo-plugin/pull/54
            Hide
            peteneal100 pete neal added a comment -

            I have repo plugin 1.11.1 on Jenkins 2.201 and can confirm it has fixed the issue for me.  (previously I was using a private build of Simon Williams fix)

            Show
            peteneal100 pete neal added a comment - I have repo plugin 1.11.1 on Jenkins 2.201 and can confirm it has fixed the issue for me.  (previously I was using a private build of Simon Williams fix)
            Hide
            dnusbaum Devin Nusbaum added a comment -

            Closing as resolved in Repo Plugin version 1.11.0+ according to comments here. Looks like the PR that fixed it was https://github.com/jenkinsci/repo-plugin/pull/54JENKINS-59560 looks possibly related so I opened https://github.com/jenkinsci/workflow-scm-step-plugin/pull/37 to try to prevent this kind of issue from affecting other SCMs going forward.

            Show
            dnusbaum Devin Nusbaum added a comment - Closing as resolved in Repo Plugin version 1.11.0+ according to comments here. Looks like the PR that fixed it was  https://github.com/jenkinsci/repo-plugin/pull/54 .  JENKINS-59560 looks possibly related so I opened  https://github.com/jenkinsci/workflow-scm-step-plugin/pull/37  to try to prevent this kind of issue from affecting other SCMs going forward.
            Hide
            dnusbaum Devin Nusbaum added a comment -

            This was also fixed on Pipeline: SCM Step Plugin's side in version 2.10.

            Show
            dnusbaum Devin Nusbaum added a comment - This was also fixed on Pipeline: SCM Step Plugin's side in version 2.10.

              People

              • Assignee:
                dnusbaum Devin Nusbaum
                Reporter:
                skolberg Sascha Kolberg
              • Votes:
                9 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: