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

Exception on CVS Log parsing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: cvs-plugin
    • Labels:
      None
    • Environment:
      CVS plugin version 2.7
    • Similar Issues:

      Description

      During CVS checkout we see the exception below. This seems to happen on every 2nd build or so. Build stops and we have to run it again.
      We recently upgraded from an older version of CVS ( 1.6 ) and jenkins 1.389 or so. This happens on all builds using CVS.

      FATAL: 1
      java.lang.ArrayIndexOutOfBoundsException: 1
      at hudson.scm.CvsLog.parseFileName(CvsLog.java:142)
      at hudson.scm.CvsLog.mapCvsLog(CvsLog.java:69)
      at hudson.scm.AbstractCvs.calculateChangeLog(AbstractCvs.java:647)
      at hudson.scm.AbstractCvs.postCheckout(AbstractCvs.java:662)
      at hudson.scm.CVSSCM.checkout(CVSSCM.java:323)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1324)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581)
      at hudson.model.Run.execute(Run.java:1518)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:236)

        Attachments

        1. build.xml
          13 kB
        2. config.xml
          3 kB
        3. log
          32 kB

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Michael Clarke
          Path:
          src/main/java/hudson/scm/CvsLog.java
          http://jenkins-ci.org/commit/cvs-plugin/a39c6a206d96106620c5eacb91f4e583cd1bb683
          Log:
          [FIXED JENKINS-16044] Allow CVS roots with backslashes during log parse

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Clarke Path: src/main/java/hudson/scm/CvsLog.java http://jenkins-ci.org/commit/cvs-plugin/a39c6a206d96106620c5eacb91f4e583cd1bb683 Log: [FIXED JENKINS-16044] Allow CVS roots with backslashes during log parse
          Hide
          mc1arke Michael Clarke added a comment -

          You've identified the correct cause of the problem, although I suspect you changelog doesn't quite list the files correctly since the matched string is 2 characters short (the 'd:' of your path). I'll see if I can create a Windows friendly fix that doesn't require users to have forward slashes

          Show
          mc1arke Michael Clarke added a comment - You've identified the correct cause of the problem, although I suspect you changelog doesn't quite list the files correctly since the matched string is 2 characters short (the 'd:' of your path). I'll see if I can create a Windows friendly fix that doesn't require users to have forward slashes
          Hide
          g9adm Anders Monrad added a comment -

          This is due to us using CVSNT and a NT path in the CVSROOT. Our CVSROOT was :pserver:cvsuser@<server>:d:\cvs, this caused line 142 in CvsLog to fail:
          final String rootName = cvsRoot.split("/", 2)[1];
          I guess this is expecting a regular unix like path like /cvs/repo/.
          Changing our CVSROOT to forwardslash fixed the problem.

          Show
          g9adm Anders Monrad added a comment - This is due to us using CVSNT and a NT path in the CVSROOT. Our CVSROOT was :pserver:cvsuser@<server>:d:\cvs, this caused line 142 in CvsLog to fail: final String rootName = cvsRoot.split("/", 2) [1] ; I guess this is expecting a regular unix like path like /cvs/repo/. Changing our CVSROOT to forwardslash fixed the problem.
          Hide
          g9adm Anders Monrad added a comment -

          The build is performing update. There does not seem to be any differnece in a failing build vs. a running build other than timing. Just restarting a failed build it might run ok. Starting it once more and it may fail again (no changes to the repository).
          It seems to affect all the jobs we have, so not isolated to the build attached, but exact same behaviour and exception in the other builds.

          Show
          g9adm Anders Monrad added a comment - The build is performing update. There does not seem to be any differnece in a failing build vs. a running build other than timing. Just restarting a failed build it might run ok. Starting it once more and it may fail again (no changes to the repository). It seems to affect all the jobs we have, so not isolated to the build attached, but exact same behaviour and exception in the other builds.
          Hide
          mc1arke Michael Clarke added a comment -

          Can you attach a job config file for a failing job? I also need confirmation if the jobs that are failing are performing an update rather than a checkout or vice-versa, or if there are any other known differences between the runs?

          Show
          mc1arke Michael Clarke added a comment - Can you attach a job config file for a failing job? I also need confirmation if the jobs that are failing are performing an update rather than a checkout or vice-versa, or if there are any other known differences between the runs?

            People

            • Assignee:
              Unassigned
              Reporter:
              g9adm Anders Monrad
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: