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

Project import fails on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.9, 7.9.1, 7.9.2, 7.9.3, 8.0, 8.1
    • Fix Version/s: 8.2
    • Labels:
      None
    • Edition:
      Enterprise
    • Production Notes:
      None

      Description

      Sometimes the project import fails on Windows with the following exception in the CE:

      java.lang.IllegalStateException: Can not delete C:\SonarQube-Enterprise-7.9.3\temp\tmp\14660280880445553790
      	at com.sonar.governance.E.A.E(Unknown Source)
      	at com.sonar.governance.ce.A.B.F.execute(Unknown Source)
      	at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:81)
      	at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:72)
      	at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:59)
      	at com.sonar.governance.ce.A.B.A(Unknown Source)
      	at com.sonar.governance.ce.A.A.A(Unknown Source)
      	at com.sonar.governance.ce.F.A.A(Unknown Source)
      	at com.sonar.governance.ce.F.A.process(Unknown Source)
      	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:209)
      	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:191)
      	at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:158)
      	at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:133)
      	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:85)
      	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: java.nio.file.FileSystemException: C:\SonarQube-Enterprise-7.9.3\temp\tmp\14660280880445553790\rules.pb: The process cannot access the file because it is being used by another process.

       

      We weren't able to reproduce the problem but I'm confident the problem is caused by a file handler that is left open in the import.

      The Java's exception message is misleading. I confirmed that it can be thrown on Windows if the same process has an open handler on the file that it tries to delete. This can happen is the file wasn't properly closed and the finalizer hasn't been called by the JVM.

      The problem was fixed in v8.2. At the time I saw the file handler wasn't being closed and fixed it, without knowing that it was actually causing a problem, so no ticket was created.

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              duarte.meneses Duarte Meneses
              Reporter:
              duarte.meneses Duarte Meneses
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: