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

Improve log output in case of error during SCM step

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.4
    • Fix Version/s: 5.6
    • Component/s: Scanner
    • Labels:

      Description

      There is certainly a problem in the SCM Sensor that is raising a request to stop everything and finish.

      In case of exception during SCM Sensor:

      • no need to dump list of files that were not blamed
      • remove log "Analysis report generated in xxx" that is confusing since no report was generated
      • ensure any exception during the "stop" of the pico container is no hidding the original exception (see following stack) Fixed in 5.5 by SONAR-7124

      During this phase we can't unlock .sonar_lock file and this is the only thing we see. The original exception is lost and we can't investigate:

      INFO: This may lead to missing/broken features in SonarQube
      INFO: Analysis report generated in D:\repos\sonartest\.sonar\batch-report
      DEBUG: Couldn't delete lock file: D:\repos\sonartest\.sonar_lock java.nio.file.NoSuchFileException: D:\repos\sonartest\.sonar_lock
      	at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
      	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
      	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
      	at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
      	at sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source)
      	at java.nio.file.Files.delete(Unknown Source)
      	at org.sonar.home.cache.DirectoryLock.unlock(DirectoryLock.java:98)
      	at org.sonar.batch.scan.ProjectLock.stop(ProjectLock.java:57)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
      	at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.stop(ReflectionLifecycleStrategy.java:96)
      	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.stop(AbstractInjectionFactory.java:88)
      	at org.picocontainer.behaviors.AbstractBehavior.stop(AbstractBehavior.java:179)
      	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.stop(Stored.java:141)
      	at org.picocontainer.behaviors.Stored.stop(Stored.java:118)
      	at org.picocontainer.DefaultPicoContainer.stopAdapters(DefaultPicoContainer.java:1048)
      	at org.picocontainer.DefaultPicoContainer.stop(DefaultPicoContainer.java:803)
      	at org.sonar.core.platform.ComponentContainer.stopComponents(ComponentContainer.java:166)
      	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
      	at org.sonar.batch.task.ScanTask.execute(ScanTask.java:55)
      	at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
      	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
      	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
      	at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:122)
      	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)
      	at org.sonar.runner.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:67)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.sonar.runner.impl.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:61)
      	at com.sun.proxy.$Proxy0.execute(Unknown Source)
      	at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:274)
      	at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:165)
      	at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:152)
      	at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:133)
      	at org.sonarsource.scanner.cli.Main.execute(Main.java:82)
      	at org.sonarsource.scanner.cli.Main.main(Main.java:66)
      
      INFO: ------------------------------------------------------------------------
      INFO: EXECUTION FAILURE
      INFO: ------------------------------------------------------------------------
      

      Context:
      SQ 5.4
      Sonar Scanner 2.5.1
      Windows 7
      JDK 64 1.8.0_66

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              julien.henry Julien Henry
              Reporter:
              alexandre.gigleux Alexandre Gigleux
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: