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

Potential read timeout on big files during Preview analyses

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3
    • Component/s: None
    • Labels:
      None

      Description

      When analyzing projects that contain big files (several MB), Preview / Incremental analyses might be impossible because of a read timeout.

      For people analyzing legacy code (like COBOL) with large program units that end up in big files, this can prevent them from making Preview analyses of their code.

      Error that occurs:

      15:04:22.233 DEBUG - Download: http://localhost:9000/api/sources?resource=myProject:myBigFile&format=txt (no proxy)
      INFO: ------------------------------------------------------------------------
      INFO: EXECUTION FAILURE
      INFO: ------------------------------------------------------------------------
      Total time: 1:12.194s
      Final Memory: 22M/965M
      INFO: ------------------------------------------------------------------------
      ERROR: Error during Sonar runner execution
      org.sonar.runner.impl.RunnerException: Unable to execute Sonar
              at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
              at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
              at java.security.AccessController.doPrivileged(Native Method)
              at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
              at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
              at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
              at org.sonar.runner.api.Runner.execute(Runner.java:90)
              at org.sonar.runner.Main.executeTask(Main.java:70)
              at org.sonar.runner.Main.execute(Main.java:59)
              at org.sonar.runner.Main.main(Main.java:41)
      Caused by: org.sonar.api.utils.SonarException: Fail to decorate 'org.sonar.api.resources.File@31b1b76e[key=MyBigFile,dir=<null>,filename=PM391B.s
      BOL]'
              at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:93)
              at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:76)
              at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
              at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
              at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.java:61)
              at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:118)
              at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:150)
              at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
              at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
              at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:211)
              at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:206)
              at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:199)
              at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
              at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
              at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:58)
              at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
              at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:82)
              at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
              at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
              at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:144)
              at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:132)
              at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
              at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
              at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
              at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
              at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
              ... 9 more
      Caused by: org.sonar.api.utils.SonarException: Unable to request: /api/sources?resource=cobol.rabo:PM391B.src&format=txt
              at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:92)
              at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:82)
              at org.sonar.batch.scan.LastSnapshots.loadSourceFromWs(LastSnapshots.java:61)
              at org.sonar.batch.scan.LastSnapshots.getSource(LastSnapshots.java:51)
              at org.sonar.plugins.core.issue.SourceHashHolder.getReferenceSource(SourceHashHolder.java:79)
              at org.sonar.plugins.core.issue.SourceHashHolder.hasBothReferenceAndCurrentSource(SourceHashHolder.java:87)
              at org.sonar.plugins.core.issue.IssueTracking.mapIssues(IssueTracking.java:82)
              at org.sonar.plugins.core.issue.IssueTracking.track(IssueTracking.java:59)
              at org.sonar.plugins.core.issue.IssueTrackingDecorator.doDecorate(IssueTrackingDecorator.java:118)
              at org.sonar.plugins.core.issue.IssueTrackingDecorator.decorate(IssueTrackingDecorator.java:100)
              at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:85)
              ... 39 more
      Caused by: java.net.SocketTimeoutException: Read timed out
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
              at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
              at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
              at java.security.AccessController.doPrivileged(Native Method)
              at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
              at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
              at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
              at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:274)
              at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:235)
              at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:88)
              ... 49 more
      Caused by: java.net.SocketTimeoutException: Read timed out
              at java.net.SocketInputStream.socketRead0(Native Method)
              at java.net.SocketInputStream.read(SocketInputStream.java:152)
              at java.net.SocketInputStream.read(SocketInputStream.java:122)
              at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
              at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
              at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
              at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
              at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
              at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
              at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2678)
              at java.net.URLConnection.getContentEncoding(URLConnection.java:533)
              at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:272)
              ... 51 more
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              henryju OLD - Julien HENRY
              Reporter:
              fabemn OLD - Fabrice Bellingard
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: