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

cvs update hang when recursive symlink in directory

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: cvs-plugin
    • Labels:
      None
    • Environment:
      redhat fc19
      jenkins 1.562
      cvs_plugin 2.11
      cvs ssh
    • Similar Issues:

      Description

      Jenkins job hangs forever doing cvs update.

      A recursive directory causes job to hang forever.
      The cvs command shown in console log is:
      'cvs update -d -P -r <branchtag> <mod>'
      A previous build job created symlinks to . in some directories in checkout area.

      Using strace can see process is recursing into directory to multiple levels . . . it is hitting an error but just seems to take forever . . . not sure if jobs will ever end by selves . . . posting stop to jenkins job doesn't work, the job remains running until jenkins itself is restarted OR process killed (which brings down jenkins).

      The error: ELOOP (Too many levels of symbolic links)

      strace fragment: (misc is a symlink to .)

      stat64("/var/lib/jenkins/jobs/buildjobname/workspace/work/projectname/module/something/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/python/python/misc/java/java/python/java/inc/misc/inc/something.py",

      {st_mode=S_IFREG|0664, st_size=3749, ...}

      ) = 0
      stat64("/var/lib/jenkins/jobs/buildjobname/workspace/work/projectname/module/something/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/python/python/misc/java/java/python/java/inc/misc/inc/something",

      {st_mode=S_IFREG|0644, st_size=345, ...}

      ) = 0
      stat64("/var/lib/jenkins/jobs/buildjobname/workspace/work/projectname/module/something/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/python/python/misc/java/java/python/java/inc/misc/inc/somethingelse",

      {st_mode=S_IFREG|0644, st_size=227, ...}

      ) = 0
      stat64("/var/lib/jenkins/jobs/buildjobname/workspace/work/projectname/module/something/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/misc/python/python/misc/java/java/python/java/inc/misc/inc/misc", 0x66b18060) = -1 ELOOP (Too many levels of symbolic links)

      CVS Plugin 2.11
      http://wiki.jenkins-ci.org/display/JENKINS/CVS+Plugin
      Jenkins ver. 1.562

      This problem with git plugin seems to have been a similar problem:
      https://issues.jenkins-ci.org/browse/JENKINS-17186
      Linux: if there is a recursive directory within the git repo you're building, the initial checkout will fail badly

        Attachments

          Activity

          Hide
          jamesco James Coleman added a comment -

          pull requests are raised . . .
          https://github.com/jenkinsci/cvs-plugin/pull/31
          https://github.com/mc1arke/cvsclient/pull/3

          Changes tidied, rebuilt cleanly, installed and tested.

          Thanks Michael, Hope those are okay. Appreciate you having a look at them. James.

          Show
          jamesco James Coleman added a comment - pull requests are raised . . . https://github.com/jenkinsci/cvs-plugin/pull/31 https://github.com/mc1arke/cvsclient/pull/3 Changes tidied, rebuilt cleanly, installed and tested. Thanks Michael, Hope those are okay. Appreciate you having a look at them. James.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: James Coleman
          Path:
          src/main/java/hudson/scm/AbstractCvs.java
          http://jenkins-ci.org/commit/cvs-plugin/60209053457903e23458d6170ac1b4409104a5d6
          Log:
          cvs-plugin part of fix for JENKINS-23234: jenkins cvs update hang when recursive symlink in directory. ignore symlinks like the major cvs clients.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Coleman Path: src/main/java/hudson/scm/AbstractCvs.java http://jenkins-ci.org/commit/cvs-plugin/60209053457903e23458d6170ac1b4409104a5d6 Log: cvs-plugin part of fix for JENKINS-23234 : jenkins cvs update hang when recursive symlink in directory. ignore symlinks like the major cvs clients.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: James Coleman
          Path:
          src/main/java/hudson/scm/AbstractCvs.java
          http://jenkins-ci.org/commit/cvs-plugin/8574c853d2399f325bb58a767e6a7bfc606cb5ac
          Log:
          cvs-plugin part of fix for JENKINS-23234: jenkins cvs update hang when recursive symlink in directory. use logger not print to stderr

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Coleman Path: src/main/java/hudson/scm/AbstractCvs.java http://jenkins-ci.org/commit/cvs-plugin/8574c853d2399f325bb58a767e6a7bfc606cb5ac Log: cvs-plugin part of fix for JENKINS-23234 : jenkins cvs update hang when recursive symlink in directory. use logger not print to stderr
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: James Coleman
          Path:
          src/main/java/hudson/scm/AbstractCvs.java
          http://jenkins-ci.org/commit/cvs-plugin/273ee9b71512492d50fe192659c546ad4ac964e1
          Log:
          cvs-plugin part of fix for JENKINS-23234: update after review: add curlies for if, simplify and remove references to issue in log output and comments, use listener.error in case of exception when checking for symlink.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Coleman Path: src/main/java/hudson/scm/AbstractCvs.java http://jenkins-ci.org/commit/cvs-plugin/273ee9b71512492d50fe192659c546ad4ac964e1 Log: cvs-plugin part of fix for JENKINS-23234 : update after review: add curlies for if, simplify and remove references to issue in log output and comments, use listener.error in case of exception when checking for symlink.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Michael Clarke
          Path:
          src/main/java/hudson/scm/AbstractCvs.java
          http://jenkins-ci.org/commit/cvs-plugin/496b0f23fc85e4941be8bc5c46b88d7728d32700
          Log:
          Merge pull request #31 from Gaoithe/fix-jenkins-23234_ignore_symlinks

          JENKINS-23234 Prevent infinite recursion on symlink resolution during CVS checkout

          Compare: https://github.com/jenkinsci/cvs-plugin/compare/7c5f8e917274...496b0f23fc85

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Clarke Path: src/main/java/hudson/scm/AbstractCvs.java http://jenkins-ci.org/commit/cvs-plugin/496b0f23fc85e4941be8bc5c46b88d7728d32700 Log: Merge pull request #31 from Gaoithe/fix-jenkins-23234_ignore_symlinks JENKINS-23234 Prevent infinite recursion on symlink resolution during CVS checkout Compare: https://github.com/jenkinsci/cvs-plugin/compare/7c5f8e917274...496b0f23fc85

            People

            • Assignee:
              mc1arke Michael Clarke
              Reporter:
              jamesco James Coleman
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: