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

Jenkins throwing errors in SCM Polling and Updates with Subversion

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • subversion-plugin
    • None
    • It's hosted on a windows server and has many plugins

      After an update maybe 2-4 weeks ago, we get the following error in the polling and when a job runs and it goes to get the code from SVN. Most of the time, if you manually force the job to run, it works.

      Here is the stack of the error:

      hudson.util.IOException2: revision check failed on https://csqaw2k832.compliancesystems.com/svn/QA/Release/PXDev/SimplicityHELOCWorkflow.FXL
      at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:189)
      at hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:132)
      at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:738)
      at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:899)
      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.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:231)
      Caused by: org.tmatesoft.svn.core.SVNException: svn: E175002: REPORT /svn/QA/!svn/bc/32712/Release/PXDev/SimplicityHELOCWorkflow.FXL failed
      at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:386)
      at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:373)
      at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:361)
      at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:707)
      at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:334)
      at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:324)
      at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.logImpl(DAVRepository.java:995)
      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:177)
      ... 11 more
      Caused by: svn: E175002: REPORT /svn/QA/!svn/bc/32712/Release/PXDev/SimplicityHELOCWorkflow.FXL failed
      at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:208)
      at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:154)
      at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:97)
      ... 27 more
      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -8
      at java.lang.String.substring(Unknown Source)
      at java.lang.String.substring(Unknown Source)
      at hudson.scm.DirAwareSVNXMLLogHandler.handleLogEntry(DirAwareSVNXMLLogHandler.java:90)
      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.dav.DAVRepository$1.handleLogEntry(DAVRepository.java:950)
      at org.tmatesoft.svn.core.internal.io.dav.handlers.DAVLogHandler.endElement(DAVLogHandler.java:226)
      at org.tmatesoft.svn.core.internal.io.dav.handlers.BasicDAVHandler.endElement(BasicDAVHandler.java:103)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:911)
      at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:876)
      at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:220)
      at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:480)
      at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:382)
      ... 26 more

          [JENKINS-22199] Jenkins throwing errors in SCM Polling and Updates with Subversion

          kutzi added a comment - - edited

          What are the versions of Jenkins and subversion-plugin in use?
          And if you still remember: what were the previous versions?

          kutzi added a comment - - edited What are the versions of Jenkins and subversion-plugin in use? And if you still remember: what were the previous versions?

          Jay Beeckman added a comment -

          Current versions are:
          Jenkins: v1.554
          Subversion Plugin: 2.2, upgraded from 2.0 I think.

          Not sure of the previous version of Jenkins, we keep it pretty up to date though. I'd say it never is more than a month back on updates. Not sure if it helps, but the credential stuff may be a factor as well, that is:
          Credentials Plugin: 1.10

          Jay Beeckman added a comment - Current versions are: Jenkins: v1.554 Subversion Plugin: 2.2, upgraded from 2.0 I think. Not sure of the previous version of Jenkins, we keep it pretty up to date though. I'd say it never is more than a month back on updates. Not sure if it helps, but the credential stuff may be a factor as well, that is: Credentials Plugin: 1.10

          I have the same problem after update jenkins from 1.549 to 1.554 and subversion plugin from 2.0 to 2.2

          František Novotný added a comment - I have the same problem after update jenkins from 1.549 to 1.554 and subversion plugin from 2.0 to 2.2

          kutzi added a comment -

          kutzi added a comment - Note: likely caused by https://github.com/jenkinsci/subversion-plugin/commit/ec606ac7557772cb07e72f00c084203810ebd815

          Toby Collett added a comment -

          Seeing this issue as well, Jenkins 1.552 and svn plugin 2.2

          We are using an external pinned to a revision, and using a host relative url something like
          ^/../basepath/leafpath@1234 leafpath

          For us this failure occurs specifically when the external in our project changes revision. The second build after an external change works again. This is very reproducible.

          Toby Collett added a comment - Seeing this issue as well, Jenkins 1.552 and svn plugin 2.2 We are using an external pinned to a revision, and using a host relative url something like ^/../basepath/leafpath@1234 leafpath For us this failure occurs specifically when the external in our project changes revision. The second build after an external change works again. This is very reproducible.

          Martin Olsson added a comment -

          We've had problems with this bug as well.
          Seems like some external definitions makes handleLogEntry call substring with an index out of range. I guess localPath is sometimes shorter than relativeUrl.
          I've included a work-around below, it seems to work for me but haven't yet been thoroughly tested.
          Is this function only used to create the changelog presented to the user? Or are there other side-effects?

          diff --git a/src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java b/src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java
          index 75e569c..faa3515 100644
          --- a/src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java
          +++ b/src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java
          @@ -16,6 +16,7 @@ import java.util.HashMap;
           import java.util.Iterator;
           import java.util.LinkedList;
           import java.util.Map;
          +import java.util.regex.Pattern;
          
           import org.tmatesoft.svn.core.ISVNLogEntryHandler;
           import org.tmatesoft.svn.core.SVNErrorCode;
          @@ -87,7 +88,7 @@ public class DirAwareSVNXMLLogHandler extends SVNXMLLogHandler implements ISVNLo
                     Map<String, SVNLogEntryPath> changedPaths = new HashMap<String, SVNLogEntryPath>();
                     for (SVNLogEntryPath entry : logEntry.getChangedPaths().values()) {
                         String localPath = entry.getPath().substring(1); // path in svn log start with a '/'
          -              localPath = relativePath + localPath.substring(relativeUrl.length());
          +              localPath = relativePath + localPath.replaceFirst(Pattern.quote(relativeUrl),"");
                         // can't use entry.setPath(localPath) as FSPathChange duplicate myPath attribute then setPath().getPath() don't return same value
                         changedPaths.put(localPath, new SVNLogEntryPath(localPath, entry.getType(), entry.getCopyPath(), entry.getCopyRevision()));
                     }
          
          

          Martin Olsson added a comment - We've had problems with this bug as well. Seems like some external definitions makes handleLogEntry call substring with an index out of range. I guess localPath is sometimes shorter than relativeUrl. I've included a work-around below, it seems to work for me but haven't yet been thoroughly tested. Is this function only used to create the changelog presented to the user? Or are there other side-effects? diff --git a/src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java b/src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java index 75e569c..faa3515 100644 --- a/src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java +++ b/src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java @@ -16,6 +16,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.Map; + import java.util.regex.Pattern; import org.tmatesoft.svn.core.ISVNLogEntryHandler; import org.tmatesoft.svn.core.SVNErrorCode; @@ -87,7 +88,7 @@ public class DirAwareSVNXMLLogHandler extends SVNXMLLogHandler implements ISVNLo Map< String , SVNLogEntryPath> changedPaths = new HashMap< String , SVNLogEntryPath>(); for (SVNLogEntryPath entry : logEntry.getChangedPaths().values()) { String localPath = entry.getPath().substring(1); // path in svn log start with a '/' - localPath = relativePath + localPath.substring(relativeUrl.length()); + localPath = relativePath + localPath.replaceFirst(Pattern.quote(relativeUrl),""); // can 't use entry.setPath(localPath) as FSPathChange duplicate myPath attribute then setPath().getPath() don' t return same value changedPaths.put(localPath, new SVNLogEntryPath(localPath, entry.getType(), entry.getCopyPath(), entry.getCopyRevision())); }

          Cees Bos added a comment -

          I have raised a pull request to fix this issue. Our builds get broken each day because of this.
          https://github.com/jenkinsci/subversion-plugin/pull/73

          Note: above proposed solution is not valid as it searches for a string in the complete path. In case a subfolder has the same name, then that will be removed, which is invalid.

          Cees Bos added a comment - I have raised a pull request to fix this issue. Our builds get broken each day because of this. https://github.com/jenkinsci/subversion-plugin/pull/73 Note: above proposed solution is not valid as it searches for a string in the complete path. In case a subfolder has the same name, then that will be removed, which is invalid.

          Code changed in jenkins
          User: Nicolas De loof
          Path:
          src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java
          src/test/java/hudson/scm/SubversionSCMTest.java
          http://jenkins-ci.org/commit/subversion-plugin/0a17b9302a1b7ae52ef1da35d7d562168acdafaf
          Log:
          Merge pull request #73 from cbos/master

          Fix JENKINS-22199

          Compare: https://github.com/jenkinsci/subversion-plugin/compare/ed6e43e04ddd...0a17b9302a1b

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De loof Path: src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java src/test/java/hudson/scm/SubversionSCMTest.java http://jenkins-ci.org/commit/subversion-plugin/0a17b9302a1b7ae52ef1da35d7d562168acdafaf Log: Merge pull request #73 from cbos/master Fix JENKINS-22199 Compare: https://github.com/jenkinsci/subversion-plugin/compare/ed6e43e04ddd...0a17b9302a1b

          Cees Bos added a comment -

          When is the next release of the subversion-plugin expected?

          Cees Bos added a comment - When is the next release of the subversion-plugin expected?

          kutzi added a comment -

          Whenever someone feels like releasing it

          kutzi added a comment - Whenever someone feels like releasing it

          Cees Bos added a comment -

          Is there anything I can help in that? Today we (again) have 3 failing jobs on this issue.

          Cees Bos added a comment - Is there anything I can help in that? Today we (again) have 3 failing jobs on this issue.

          kutzi added a comment -

          Cees, what would be valuable, would be testing a snapshot build with the fix (i.e. https://jenkins.ci.cloudbees.com/job/plugins/job/subversion-plugin/335/org.jenkins-ci.plugins$subversion/artifact/org.jenkins-ci.plugins/subversion/2.3-SNAPSHOT/subversion-2.3-SNAPSHOT.hpi) to check if there are any other regressions in it

          kutzi added a comment - Cees, what would be valuable, would be testing a snapshot build with the fix (i.e. https://jenkins.ci.cloudbees.com/job/plugins/job/subversion-plugin/335/org.jenkins-ci.plugins$subversion/artifact/org.jenkins-ci.plugins/subversion/2.3-SNAPSHOT/subversion-2.3-SNAPSHOT.hpi ) to check if there are any other regressions in it

          James Keppel added a comment -

          Hi kutzi, I tested the plugin snapshot in order to try and resolve the related issue JENKINS-22573, and I ma still receiving a stacktrace like Jay in issue JENKINS-22573.

          I have also posted this in issue JENKINS-22573, and steps to reproduce the "org.tmatesoft.svn.core.SVNException: svn: E175002:" via the SCM Sync Plugin.

          Happy to undertake any testing to assist in resolving this issue (if it is in in fact the SVN plugin and not the SCM Sync plugin)

          James Keppel added a comment - Hi kutzi, I tested the plugin snapshot in order to try and resolve the related issue JENKINS-22573 , and I ma still receiving a stacktrace like Jay in issue JENKINS-22573 . I have also posted this in issue JENKINS-22573 , and steps to reproduce the "org.tmatesoft.svn.core.SVNException: svn: E175002:" via the SCM Sync Plugin. Happy to undertake any testing to assist in resolving this issue (if it is in in fact the SVN plugin and not the SCM Sync plugin)

          Cees Bos added a comment -

          We currently use the snapshot plugin, and the issues reported in this ticket does not occur anymore.

          Cees Bos added a comment - We currently use the snapshot plugin, and the issues reported in this ticket does not occur anymore.

          So far so good with the snapshot release. Before applying the snapshot we would see this issue several times a day.

          Craig Sheppard added a comment - So far so good with the snapshot release. Before applying the snapshot we would see this issue several times a day.

          kutzi added a comment -

          Fixed by reverting JENKINS-18574

          kutzi added a comment - Fixed by reverting JENKINS-18574

          Jay Beeckman added a comment -

          I am no longer seeing the issue. Has been a week or two after the update. I think it is resolved. Thank you!

          Jay Beeckman added a comment - I am no longer seeing the issue. Has been a week or two after the update. I think it is resolved. Thank you!

          Daniel Beck added a comment -

          If you're experiencing a similar error in 2.4, it's a different issue: JENKINS-23146.

          Daniel Beck added a comment - If you're experiencing a similar error in 2.4, it's a different issue: JENKINS-23146 .

          Hi all,
          I have also the same issue since I have upgraded subversion plugin from version 1.5 (or around it) to 2.4.
          I don't specially need the features of 2.4 version compared to 2.3 version.
          My question is, if I downgrade subversion plugin to 2.3,I fix this bug?

          Florent DALIGAND added a comment - Hi all, I have also the same issue since I have upgraded subversion plugin from version 1.5 (or around it) to 2.4. I don't specially need the features of 2.4 version compared to 2.3 version. My question is, if I downgrade subversion plugin to 2.3,I fix this bug?

          Daniel Beck added a comment -

          Florent: This is an issue tracker, not a support site. For questions like that, please email the jenkinsci-users mailing list or ask on IRC.

          Daniel Beck added a comment - Florent: This is an issue tracker, not a support site. For questions like that, please email the jenkinsci-users mailing list or ask on IRC.

            kutzi kutzi
            gsxjay Jay Beeckman
            Votes:
            11 Vote for this issue
            Watchers:
            25 Start watching this issue

              Created:
              Updated:
              Resolved: