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

Low max memory of main process can lead to OOM in log Gobbler

    Details

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

      Description

      OOM such as the following can occur under some (not so defined) circumstances:

      2016.11.19 17:41:25 ERROR web[][o.s.s.w.WebServiceEngine] Fail to process request http://172.30.2.252:12475/api/measures/component_tree?s=metric&metricSort=vulnerabilities&asc=false&ps=500&baseComponentKey=MASTER_PROJECT&metricKeys=ncloc%2Csecurity_remediation_effort%2Cvulnerabilities&strategy=leaves
      Exception in thread "Gobbler[web]" java.lang.OutOfMemoryError: Java heap space
              at java.util.Arrays.copyOf(Arrays.java:3332)
              at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
              at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:596)
              at java.lang.StringBuffer.append(StringBuffer.java:367)
              at java.io.BufferedReader.readLine(BufferedReader.java:370)
              at java.io.BufferedReader.readLine(BufferedReader.java:389)
              at org.sonar.process.monitor.StreamGobbler.run(StreamGobbler.java:56)
      

      Apparently, the main process didn't have enough heap available to copy a line from the sub process "web" to sonar.log.
      It either means one single very very long line was produced by the sub process "web", or many long line were produced over a short period of time during which heap would not be recovered to copy this one (maybe due to line still being in process of being written done), or something like that.

        Attachments

          Activity

            People

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

              Dates

              • Due:
                Created:
                Updated:
                Resolved: