Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-9930

Noisy ERROR logs when failing to delete a temp directory that does not exist

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.6.7, 6.5
    • Fix Version/s: 6.7
    • Component/s: None
    • Labels:
      None

      Description

      SONAR-9734 increased the level of logs to ERROR when temp files fail to be deleted. That allows to detect file leaks. As a consequence it now logs an error when trying to delete a temp dir/file that has already been deleted :

      2017.10.09 10:26:03 ERROR [o.s.a.u.i.DefaultTempFolder] Failed to delete temp folder
      java.nio.file.NoSuchFileException: /path/to/sonarqube-5.6.7/temp/ce/588972936540006972
      	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) ~[na:1.8.0_66]
      	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.8.0_66]
      	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[na:1.8.0_66]
      	at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) ~[na:1.8.0_66]
      	at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144) ~[na:1.8.0_66]
      	at java.nio.file.Files.readAttributes(Files.java:1737) ~[na:1.8.0_66]
      	at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219) ~[na:1.8.0_66]
      	at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276) ~[na:1.8.0_66]
      	at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322) ~[na:1.8.0_66]
      	at java.nio.file.Files.walkFileTree(Files.java:2662) ~[na:1.8.0_66]
      	at java.nio.file.Files.walkFileTree(Files.java:2742) ~[na:1.8.0_66]
      	at org.sonar.api.utils.internal.DefaultTempFolder.clean(DefaultTempFolder.java:96) [sonar-plugin-api-5.6.7.jar:na]
      	at org.sonar.api.utils.internal.DefaultTempFolder.stop(DefaultTempFolder.java:104) [sonar-plugin-api-5.6.7.jar:na]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                simon.brandhof Simon Brandhof
                Reporter:
                simon.brandhof Simon Brandhof
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: