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

false Static Analysis Warnings with symlinks in ClearCase


    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: warnings-plugin
    • Labels:
    • Environment:
      Jenkins 1.656
      Linux CentOS 5
      Warnings plugin 4.52
      ClearCase plugin 1.6.2
    • Similar Issues:


      We're using the latest Jenkins on Linux to build a project that is stored in ClearCase. Everything builds correctly, but we get some Static Analysis Warnings when we shouldn't.

      When the ClearCase plugin gets the project's files, I can see in the Console Output:

      14:22:36 New:                     vobs/1062_GEN3/configuration/tools/CSU/device_get_logs_info.sh /main/Integration/2 
      14:22:36 New:                     vobs/1062_GEN3/configuration/tools/RIU/device_get_logs_info.sh "symbolic link d6377eb4.fc7711e5.8fd8.00:50:56:bc:54:8e" SYMLINK

      So, that's a text file in one directory and a symlink to that file from an adjacent directory.

      We have Scan For Compiler Warnings enabled with Scan Console Log with parser GNU C COmpiler 3 (gcc). The build reports:

      GNU C Compiler Warnings: 1 warning
      Static Analysis Warnings: 1 warning

      When I click on the warning links, they both take me to the same place which is the above symlink. Clicking through to the warning message, I get the stack trace below. Note that it seems to be taking the "New:" and a lot of spaces as part of the file name.

      There are other similar symlinks in the project that don't produce any warnings. I've tried destroying and recreating the link. I've tried swapping around the file and the link (i.e. make the link point in the other direction). No joy.

      Copying the source file 'New:                     vobs/1062_GEN3/configuration/tools/RIU/device_get_logs_info.sh "symbolic link d6377eb4.fc7711e5.8fd8.00' from the workspace to the build folder 'bcde0ed7.tmp' on the Jenkins master failed.
      02 Is the file 'New:                     vobs/1062_GEN3/configuration/tools/RIU/device_get_logs_info.sh "symbolic link d6377eb4.fc7711e5.8fd8.00' a valid filename?
      03 If you are building on a slave: please check if the file is accessible under '$JENKINS_HOME/[job-name]/New:                     vobs/1062_GEN3/configuration/tools/RIU/device_get_logs_info.sh "symbolic link d6377eb4.fc7711e5.8fd8.00'
      04 If you are building on the master: please check if the file is accessible under '$JENKINS_HOME/[job-name]/workspace/New:                     vobs/1062_GEN3/configuration/tools/RIU/device_get_logs_info.sh "symbolic link d6377eb4.fc7711e5.8fd8.00'
      05 java.io.IOException: Failed to copy New:                     vobs/1062_GEN3/configuration/tools/RIU/device_get_logs_info.sh "symbolic link d6377eb4.fc7711e5.8fd8.00 to /var/lib/jenkins/jobs/Integration-PrivateBranch/builds/131/workspace-files/bcde0ed7.tmp
      06   at hudson.FilePath.copyTo(FilePath.java:1990)
      07   at hudson.plugins.analysis.util.Files.copyFilesWithAnnotationsToBuildFolder(Files.java:80)
      08   at hudson.plugins.analysis.core.HealthAwareRecorder.copyFilesWithAnnotationsToBuildFolder(HealthAwareRecorder.java:312)
      09   at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:89)
      10   at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:259)
      11   at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      12   at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      13   at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      14   at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      15   at hudson.model.Build$BuildExecution.post2(Build.java:185)
      16   at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      17   at hudson.model.Run.execute(Run.java:1763)
      18   at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      19   at hudson.model.ResourceController.execute(ResourceController.java:98)
      20   at hudson.model.Executor.run(Executor.java:410)
      21 Caused by: java.io.FileNotFoundException: New:                     vobs/1062_GEN3/configuration/tools/RIU/device_get_logs_info.sh "symbolic link d6377eb4.fc7711e5.8fd8.00 (No such file or directory)
      22   at java.io.FileInputStream.open(Native Method)
      23   at java.io.FileInputStream.<init>(FileInputStream.java:146)
      24   at hudson.FilePath$41.invoke(FilePath.java:2016)
      25   at hudson.FilePath$41.invoke(FilePath.java:2011)
      26   at hudson.FilePath.act(FilePath.java:990)
      27   at hudson.FilePath.act(FilePath.java:968)
      28   at hudson.FilePath.copyTo(FilePath.java:2011)
      29   at hudson.FilePath.copyTo(FilePath.java:1985)
      30   ... 14 more




            • Assignee:
              drulli Ulli Hafner
              gfim Graham Menhennitt
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: