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

StringIndexOutOfBoundsException on subversion checkout

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • subversion-plugin
    • Master on CentOS, issues seen on CentOS and Windows hosted slaves

      I upgraded to Jenkins 1.554.1 with Subversion plugin 2.4 yesterday and I am seeing this and similar in the build logs of some jobs trying to checkout code from subversion:

      FATAL: String index out of range: -7
      java.lang.StringIndexOutOfBoundsException: String index out of range: -7
      	at java.lang.String.substring(String.java:1875)
      	at hudson.scm.DirAwareSVNXMLLogHandler.sendToHandler(DirAwareSVNXMLLogHandler.java:111)
      	at hudson.scm.DirAwareSVNXMLLogHandler.handleLogEntry(DirAwareSVNXMLLogHandler.java:82)
      	at org.tmatesoft.svn.core.internal.wc2.compat.SvnCodec$7.receive(SvnCodec.java:167)
      	at org.tmatesoft.svn.core.internal.wc2.compat.SvnCodec$7.receive(SvnCodec.java:164)
      	at org.tmatesoft.svn.core.wc2.SvnReceivingOperation.receive(SvnReceivingOperation.java:78)
      	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.handleLogEntry(SvnRemoteLog.java:199)
      	at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.logImpl(SVNRepositoryImpl.java:827)
      	at org.tmatesoft.svn.core.io.SVNRepository.log(SVNRepository.java:1035)
      	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:181)
      	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:35)
      	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:20)
      	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1238)
      	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
      	at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:967)
      	at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:872)
      	at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:179)
      	at hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:118)
      	at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:735)
      	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:873)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1414)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:671)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:580)
      	at hudson.model.Run.execute(Run.java:1676)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:231)
      

      Note that the index is not always -7.

      When the job is rerun the next build does the checkout no problem.

      I am aware of JENKINS-22199 and this looks very similar but JENKINS-22199 is meant to have been fixed in Subversion plugin 2.3.

          [JENKINS-23146] StringIndexOutOfBoundsException on subversion checkout

          Jesse Glick added a comment -

          2.4.3 released and on CloudBees update center: http://jenkins-updates.cloudbees.com/download/plugins/subversion/2.4.3/subversion.hpi

          OSS update center lags behind but should be there within a day.

          Jesse Glick added a comment - 2.4.3 released and on CloudBees update center: http://jenkins-updates.cloudbees.com/download/plugins/subversion/2.4.3/subversion.hpi OSS update center lags behind but should be there within a day.

          Jesse Glick added a comment -

          (Not sure if this can now be closed as fixed.)

          Jesse Glick added a comment - (Not sure if this can now be closed as fixed.)

          Code changed in jenkins
          User: Daniel Beck
          Path:
          src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java
          http://jenkins-ci.org/commit/subversion-plugin/14e5ca455e3786790ad5cb68348012f5d93376f8
          Log:
          JENKINS-23146 Handle changes to folder checked out to '.'

          (cherry picked from commit 3df6c0b32db52e275ff6158b93e2022c0067625c)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java http://jenkins-ci.org/commit/subversion-plugin/14e5ca455e3786790ad5cb68348012f5d93376f8 Log: JENKINS-23146 Handle changes to folder checked out to '.' (cherry picked from commit 3df6c0b32db52e275ff6158b93e2022c0067625c)

          Daniel Beck added a comment -

          With the cherry-pick to master I consider this fixed.

          To get the fix, download 2.4.3 or the next 2.5 or higher release, or build from master.

          Daniel Beck added a comment - With the cherry-pick to master I consider this fixed. To get the fix, download 2.4.3 or the next 2.5 or higher release, or build from master.

          Nico K. added a comment -

          Thanks to Daniel Beck and all who worked on this!

          Nico K. added a comment - Thanks to Daniel Beck and all who worked on this!

          Pawel Grzegrzolka added a comment - - edited

          Sorry for posting in already closed issue, but it looks for me, that it hasn't been solved. I updated to the latest 2.5-beta-2 subversion plugin (and Jenkins v 1.583) but still have "-1" issue. Strange that only one external repository is affected.

          As you can see in the polling log, it's trigger to build a job cause plugin reads -1 revision.

          Started on Oct 2, 2014 10:10:00 AM
          Received SCM poll call on master for ProjectX on Oct 2, 2014 10:10:00 AM
          https://host1/svn/repo1/tags/latest is at revision 136
          https://host2/svn/repo2/trunk is at revision 44
          https://host2/svn/repo2/trunk/tests is at revision 974
            (changed from -1)
          https://host1/repo3/trunk/path is at revision 83
          Done. Took 1.7 sec
          Changes found
          

          All listed repositories are svn:externals.

          Pawel Grzegrzolka added a comment - - edited Sorry for posting in already closed issue, but it looks for me, that it hasn't been solved. I updated to the latest 2.5-beta-2 subversion plugin (and Jenkins v 1.583) but still have "-1" issue. Strange that only one external repository is affected. As you can see in the polling log, it's trigger to build a job cause plugin reads -1 revision. Started on Oct 2, 2014 10:10:00 AM Received SCM poll call on master for ProjectX on Oct 2, 2014 10:10:00 AM https://host1/svn/repo1/tags/latest is at revision 136 https://host2/svn/repo2/trunk is at revision 44 https://host2/svn/repo2/trunk/tests is at revision 974 (changed from -1) https://host1/repo3/trunk/path is at revision 83 Done. Took 1.7 sec Changes found All listed repositories are svn:externals.

          Daniel Beck added a comment -

          Pawel: This has nothing to do with this issue report.

          Daniel Beck added a comment - Pawel: This has nothing to do with this issue report.

          Doesn't it? Tracker says something different.
          My issue is the same as mentioned in the JENKINS-22158, which is a duplicated of JENKINS-22199, where you asked to forward to this Jira Slightly complicated, but I hope tracker doesn't outsmart us.

          Pawel Grzegrzolka added a comment - Doesn't it? Tracker says something different. My issue is the same as mentioned in the JENKINS-22158 , which is a duplicated of JENKINS-22199 , where you asked to forward to this Jira Slightly complicated, but I hope tracker doesn't outsmart us.

          Daniel Beck added a comment -

          I think JENKINS-22158 is two separate issues, one in the original report, one in the first comment, and the one in the comment is what Yoichi Nakayama was referring to for JENKINS-22199.

          To clarify, this issue here only occurs during the actual changelog computation, which happens only after a build is started; and your polling log happens before that (and actually triggers a build).

          Daniel Beck added a comment - I think JENKINS-22158 is two separate issues, one in the original report, one in the first comment, and the one in the comment is what Yoichi Nakayama was referring to for JENKINS-22199 . To clarify, this issue here only occurs during the actual changelog computation, which happens only after a build is started; and your polling log happens before that (and actually triggers a build).

          Thanks for clarification. I'm going to reopen JENKINS-22158 than.

          Pawel Grzegrzolka added a comment - Thanks for clarification. I'm going to reopen JENKINS-22158 than.

            danielbeck Daniel Beck
            kevinhcross Kevin Cross
            Votes:
            60 Vote for this issue
            Watchers:
            71 Start watching this issue

              Created:
              Updated:
              Resolved: