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

Task scanner dies on bad symlink (unhandled java.io.FileNotFoundException)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: tasks-plugin
    • Labels:
      None
    • Environment:
      RHEL 5.5, Clearcase Dynamic View

      Description

      If a file in the workspace is a symlink whose target path isn't retrievable (say its absolute and isn't completely contained (relatively) in the workspace, then the task scanner plugin dies.

      [TASKS] Scanning workspace files for tasks...
      ERROR: Publisher hudson.plugins.tasks.TasksPublisher aborted due to exception
      java.io.FileNotFoundException: "symlink source" (No such file or directory)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:137)
      at hudson.FilePath.read(FilePath.java:1250)
      at hudson.plugins.tasks.parser.WorkspaceScanner.invoke(WorkspaceScanner.java:140)
      at hudson.plugins.tasks.parser.WorkspaceScanner.invoke(WorkspaceScanner.java:26)
      at hudson.FilePath.act(FilePath.java:758)
      at hudson.FilePath.act(FilePath.java:740)
      at hudson.plugins.tasks.TasksPublisher.perform(TasksPublisher.java:206)
      at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:310)
      at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:682)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:657)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:635)
      at hudson.model.Build$RunnerImpl.post2(Build.java:161)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:604)
      at hudson.model.Run.run(Run.java:1400)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:175)
      [ClearCase] Restored the original build steps.
      Finished: FAILURE

      Suggest Tasks Plugin just log something non fatal to console and continue in such circumstances.

        Activity

        moncreaff Greg Moncreaff created issue -
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in jenkins
        User: Ulli Hafner
        Path:
        src/main/java/hudson/plugins/tasks/parser/WorkspaceScanner.java
        http://jenkins-ci.org/commit/tasks-plugin/dd79186b4a02ec4be405462b871ffca644d079e8
        Log:
        [FIXED JENKINS-10626] Ignore files that could not be read.

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/tasks/parser/WorkspaceScanner.java http://jenkins-ci.org/commit/tasks-plugin/dd79186b4a02ec4be405462b871ffca644d079e8 Log: [FIXED JENKINS-10626] Ignore files that could not be read.
        scm_issue_link SCM/JIRA link daemon made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        dogfood dogfood added a comment -

        Integrated in plugins_tasks #123

        Show
        dogfood dogfood added a comment - Integrated in plugins_tasks #123

          People

          • Assignee:
            drulli Ulli Hafner
            Reporter:
            moncreaff Greg Moncreaff
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: