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

          Jay Beeckman created issue -

          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?
          kutzi made changes -
          Assignee New: Nicolas De Loof [ ndeloof ]

          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.
          Yoichi Nakayama made changes -
          Link New: This issue duplicates JENKINS-22158 [ JENKINS-22158 ]
          Yoichi Nakayama made changes -
          Link New: This issue duplicates JENKINS-21683 [ JENKINS-21683 ]

          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())); }

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

              Created:
              Updated:
              Resolved: