SonarQube Eclipse
  1. SonarQube Eclipse
  2. SONARIDE-268

Sonar Local analysis : no way to tune the Findbugs timeout threshold

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: Local Mode
    • Labels:
      None
    • Number of attachments :
      0

      Description

      On a quite large project (5k classes) the local Sonar analysis times out.

      org.picocontainer.PicoLifecycleException: PicoLifecycleException: method 'public void org.sonar.batch.components.EmbedderPhases.start()', instance 'org.sonar.batch.components.EmbedderPhases@128d2df, java.lang.RuntimeException: wrapper
      at org.picocontainer.monitors.NullComponentMonitor.lifecycleInvocationFailed(NullComponentMonitor.java:77)
      at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThrowReflectionLifecycleException(ReflectionLifecycleStrategy.java:132)
      at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:115)
      at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
      at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
      at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
      at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
      at org.picocontainer.behaviors.Stored.start(Stored.java:110)
      at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:996)
      at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:989)
      at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:746)
      at org.sonar.batch.Module.start(Module.java:88)
      at org.sonar.batch.SonarEclipseRuntime.analyse(SonarEclipseRuntime.java:44)
      at org.sonar.ide.eclipse.core.jobs.AnalyseProjectJob.run(AnalyseProjectJob.java:101)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
      Caused by: java.lang.RuntimeException: wrapper
      at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThrowReflectionLifecycleException(ReflectionLifecycleStrategy.java:130)
      ... 13 more
      Caused by: org.sonar.api.utils.SonarException: Can not execute Findbugs
      at org.sonar.plugins.findbugs.FindbugsExecutor.execute(FindbugsExecutor.java:110)
      at org.sonar.plugins.findbugs.FindbugsSensor.analyse(FindbugsSensor.java:58)
      at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:58)
      at org.sonar.batch.components.EmbedderPhases.start(EmbedderPhases.java:64)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
      ... 12 more
      Caused by: java.util.concurrent.TimeoutException
      at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:228)
      at java.util.concurrent.FutureTask.get(FutureTask.java:91)
      at org.sonar.plugins.findbugs.FindbugsExecutor.execute(FindbugsExecutor.java:102)
      ... 20 more
      

      At the moment, there is no way to tune the Timeout value, so i'm stuck here with no possibility of local analysis for this project.

        Issue Links

          Activity

          Hide
          Michael Biermann added a comment -

          We do face the same issue on large projects. If someone can share any input, that would be great.

          Show
          Michael Biermann added a comment - We do face the same issue on large projects. If someone can share any input, that would be great.
          Hide
          Freddy Mallet added a comment -

          Hi Guys, this timeout limit can be tuned on Sonar server side : Configuration > Global Settings > Findbugs > sonar.findbugs.timeout property. The default value is 10 minutes. I'm pretty sure that this will fix this issue.

          Show
          Freddy Mallet added a comment - Hi Guys, this timeout limit can be tuned on Sonar server side : Configuration > Global Settings > Findbugs > sonar.findbugs.timeout property. The default value is 10 minutes. I'm pretty sure that this will fix this issue.
          Hide
          Evgeny Mandrikov added a comment - - edited

          Freddy, if I correctly remember, then this will not help, because only quality profile loaded from server, but not settings.

          Show
          Evgeny Mandrikov added a comment - - edited Freddy, if I correctly remember, then this will not help, because only quality profile loaded from server, but not settings.
          Hide
          Freddy Mallet added a comment -

          In that case, do you think that using the Settings values would be the solution to solve this issue ?

          Show
          Freddy Mallet added a comment - In that case, do you think that using the Settings values would be the solution to solve this issue ?
          Hide
          Evgeny Mandrikov added a comment -

          Not sure, because in this particular case we talk about timeout, which is in fact might be different when you launch analysis on Server and Locally, because of difference in machines (memory, performance).

          Show
          Evgeny Mandrikov added a comment - Not sure, because in this particular case we talk about timeout, which is in fact might be different when you launch analysis on Server and Locally, because of difference in machines (memory, performance).
          Hide
          Freddy Mallet added a comment -

          Let's say that reusing the timeout defined on Sonar server side should work in most cases. So fix of SONARIDE-205 automatically fix this issue.

          Show
          Freddy Mallet added a comment - Let's say that reusing the timeout defined on Sonar server side should work in most cases. So fix of SONARIDE-205 automatically fix this issue.
          Hide
          Freddy Mallet added a comment -

          Manually tested !

          To do this test I set a timeout threshold of 1 millisecond and so get a Timeout exception.

          Show
          Freddy Mallet added a comment - Manually tested ! To do this test I set a timeout threshold of 1 millisecond and so get a Timeout exception.

            People

            • Assignee:
              Julien HENRY
              Reporter:
              Vincent Latombe
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: