[JIRA] [multiple-scms-plugin] (JENKINS-34766) String index out of range in MultiSCMRevisionState.keyFor

4 views
Skip to first unread message

fubar+jenkins@mozilla.com (JIRA)

unread,
May 12, 2016, 10:17:01 AM5/12/16
to jenkinsc...@googlegroups.com
Kendall Libby created an issue
 
Jenkins / Bug JENKINS-34766
String index out of range in MultiSCMRevisionState.keyFor
Issue Type: Bug Bug
Assignee: Kevin Bell
Components: multiple-scms-plugin
Created: 2016/May/12 2:16 PM
Environment: Jenkins >= 1.649, multiple-scm plugin >= 0.4, git plugin >= 2.4.0, mercurial plugin 1.54
Priority: Major Major
Reporter: Kendall Libby

I have a job that polls a bunch of git and mercurial repos and indexes them for code cross referencing site. Ever since upgrading Jenkins to 1.650 for a security issue, it's been failing with the below error. I've tried juggling various versions of the plugins around; I am unwilling to roll back the Jenkins version for security concerns.

It's not repo specific. For example, if the list is repo1, repo2, and repo3 and it bombs on repo2 I can remove repo2 and it'll now bomb on repo1, which didn't have an issue on the first try. It's also not mercurial specific, as it'll do the same on a git repo.

a mercurial example:
13:49:45 pulling from https://hg.mozilla.org/build/buildbot
13:49:45 no changes found
13:49:45 [buildbot] $ hg update --clean --rev default
13:49:45 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
13:49:45 [buildbot] $ hg log --rev . --template

{node}

13:49:45 [buildbot] $ hg log --rev . --template

{rev}

13:49:45 FATAL: String index out of range: -1
13:49:45 java.lang.StringIndexOutOfBoundsException: String index out of range: -1
13:49:45 at java.lang.String.substring(String.java:1931)
13:49:45 at org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState.keyFor(MultiSCMRevisionState.java:41)
13:49:45 at org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState.get(MultiSCMRevisionState.java:30)
13:49:45 at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:141)
13:49:45 at hudson.scm.SCM.checkout(SCM.java:485)
13:49:45 at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
13:49:45 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
13:49:45 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
13:49:45 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
13:49:45 at hudson.model.Run.execute(Run.java:1738)
13:49:45 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
13:49:45 at hudson.model.ResourceController.execute(ResourceController.java:98)
13:49:45 at hudson.model.Executor.run(Executor.java:410)

and for a git repo:
14:56:25 Cloning repository https://github.com/mozilla/build-cloud-tools
14:56:25 > git init /data/dxr_data/build/cloud-tools # timeout=10
14:56:25 Fetching upstream changes from https://github.com/mozilla/build-cloud-tools
14:56:25 > git --version # timeout=10
14:56:25 > git -c core.askpass=true fetch --tags --progress https://github.com/mozilla/build-cloud-tools +refs/heads/:refs/remotes/origin/
14:56:27 > git config remote.origin.url https://github.com/mozilla/build-cloud-tools # timeout=10
14:56:27 > git config --add remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10
14:56:27 > git config remote.origin.url https://github.com/mozilla/build-cloud-tools # timeout=10
14:56:27 Fetching upstream changes from https://github.com/mozilla/build-cloud-tools
14:56:27 > git -c core.askpass=true fetch --tags --progress https://github.com/mozilla/build-cloud-tools +refs/heads/:refs/remotes/origin/
14:56:27 Seen branch in repository origin/ami-udaprews050916
14:56:27 Seen branch in repository origin/ami-update
14:56:27 Seen branch in repository origin/bz1267913
14:56:27 Seen branch in repository origin/master
14:56:27 Seen 4 remote branches
14:56:27 Checking out Revision f608764128705acea53ff8c6a42482f09038c6b2 (origin/master)
14:56:27 > git config core.sparsecheckout # timeout=10
14:56:27 > git checkout -f f608764128705acea53ff8c6a42482f09038c6b2
14:56:28 > git rev-list ce85bd66ca6fb1c7eae4ddbca4a3a9d0305a60d2 # timeout=10
14:56:28 FATAL: String index out of range: -1
14:56:28 java.lang.StringIndexOutOfBoundsException: String index out of range: -1
14:56:28 at java.lang.String.substring(String.java:1931)
14:56:28 at org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState.keyFor(MultiSCMRevisionState.java:41)
14:56:28 at org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState.get(MultiSCMRevisionState.java:30)
14:56:28 at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:141)
14:56:28 at hudson.scm.SCM.checkout(SCM.java:485)
14:56:28 at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
14:56:28 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
14:56:28 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
14:56:28 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
14:56:28 at hudson.model.Run.execute(Run.java:1738)
14:56:28 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
14:56:28 at hudson.model.ResourceController.execute(ResourceController.java:98)
14:56:28 at hudson.model.Executor.run(Executor.java:410)

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

rodrigc@FreeBSD.org (JIRA)

unread,
Sep 15, 2016, 9:35:03 PM9/15/16
to jenkinsc...@googlegroups.com
Craig Rodrigues resolved as Won't Fix
 

Suggest that you migrate to Pipeline plugin, which offers a supported way of checking out from multiple scms
https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin

Change By: Craig Rodrigues
Status: Open Resolved
Resolution: Won't Fix
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages