-
versions used: SonarQube EE v8.9.0, Sonar Scanner on Azure DevOps (latest)
-
error observed:
2021-06-18T08:56:15.5579959Z INFO: ------------------------------------------------------------------------
2021-06-18T08:56:15.5581478Z INFO: Total time: 5:19:03.223s
2021-06-18T08:56:20.7113091Z INFO: Final Memory: 2103M/4096M
2021-06-18T08:56:20.7165106Z INFO: ------------------------------------------------------------------------
2021-06-18T08:56:20.7191688Z ##[error]ERROR: Error during SonarScanner execution
2021-06-18T08:56:20.7193310Z ERROR: Error during SonarScanner execution
2021-06-18T08:56:20.7194438Z ##[error]java.lang.OutOfMemoryError: Java heap space
2021-06-18T08:56:20.7195843Z java.lang.OutOfMemoryError: Java heap space
2021-06-18T08:56:20.7203892Z ##[error]at java.base/java.util.Comparator$$Lambda$1256/0x0000000800c85040.get$Lambda(Unknown Source)
at java.base/java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(DirectMethodHandle$Holder)
at java.base/java.lang.invoke.Invokers$Holder.linkToTargetMethod(Invokers$Holder)
at java.base/java.util.Comparator.thenComparing(Comparator.java:215)
at java.base/java.util.Comparator.thenComparingInt(Comparator.java:284)
at com.sonar.A.A.A(na:2633)
at com.sonar.security.analysis.D.J$_B.A(na:1022)
at com.sonar.security.analysis.D.J$_B.<init>(na:1350)
at com.sonar.security.analysis.D.J$_B.C(na:2253)
at com.sonar.security.analysis.D.J$_B.A(na:3353)
at com.sonar.security.analysis.D.C.A(na:1306)
at com.sonar.security.analysis.D.J.A(na:2625)
2021-06-18T08:56:20.7211992Z at java.base/java.util.Comparator$$Lambda$1256/0x0000000800c85040.get$Lambda(Unknown Source)
2021-06-18T08:56:20.7212945Z at java.base/java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(DirectMethodHandle$Holder)
2021-06-18T08:56:20.7213754Z at java.base/java.lang.invoke.Invokers$Holder.linkToTargetMethod(Invokers$Holder)
2021-06-18T08:56:20.7218850Z at java.base/java.util.Comparator.thenComparing(Comparator.java:215)
2021-06-18T08:56:20.7219728Z at java.base/java.util.Comparator.thenComparingInt(Comparator.java:284)
2021-06-18T08:56:20.7220364Z at com.sonar.A.A.A(na:2633)
2021-06-18T08:56:20.7221152Z at com.sonar.security.analysis.D.J$_B.A(na:1022)
2021-06-18T08:56:20.7222248Z at com.sonar.security.analysis.D.J$_B.<init>(na:1350)
2021-06-18T08:56:20.7222896Z at com.sonar.security.analysis.D.J$_B.C(na:2253)
2021-06-18T08:56:20.7223593Z at com.sonar.security.analysis.D.J$_B.A(na:3353)
2021-06-18T08:56:20.7224279Z at com.sonar.security.analysis.D.C.A(na:1306)
2021-06-18T08:56:20.7224908Z at com.sonar.security.analysis.D.J.A(na:2625)
2021-06-18T08:56:20.7229439Z ##[error]at com.sonar.security.analysis.D.K.C(na:405)
at com.sonar.security.analysis.D.K.A(na:2439)
at com.sonar.security.analysis.D.A.B(na:3336)
at com.sonar.security.analysis.D.A.C(na:978)
at com.sonar.security.analysis.D.E.A(na:2957)
at com.sonar.security.analysis.D.E.A(na:1060)
2021-06-18T08:56:20.7234172Z at com.sonar.security.analysis.D.K.C(na:405)
2021-06-18T08:56:20.7234916Z at com.sonar.security.analysis.D.K.A(na:2439)
2021-06-18T08:56:20.7235619Z at com.sonar.security.analysis.D.A.B(na:3336)
2021-06-18T08:56:20.7236284Z at com.sonar.security.analysis.D.A.C(na:978)
2021-06-18T08:56:20.7236980Z at com.sonar.security.analysis.D.E.A(na:2957)
2021-06-18T08:56:20.7237889Z at com.sonar.security.analysis.D.E.A(na:1060)
2021-06-18T08:56:20.7240499Z ##[error]at com.sonar.security.analysis.D.E.A(na:1075)
at com.sonar.security.analysis.D.J$_B.A(na:3289)
2021-06-18T08:56:20.7242205Z at com.sonar.security.analysis.D.E.A(na:1075)
2021-06-18T08:56:20.7243384Z at com.sonar.security.analysis.D.J$_B.A(na:3289)
2021-06-18T08:56:20.7245352Z ##[error]at com.sonar.security.analysis.D.J$_B.C(na:2096)
at com.sonar.security.analysis.D.J$_B.B(na:26)
at com.sonar.security.analysis.D.J$_B.A(na:2328)
2021-06-18T08:56:20.7247372Z at com.sonar.security.analysis.D.J$_B.C(na:2096)
2021-06-18T08:56:20.7248133Z at com.sonar.security.analysis.D.J$_B.B(na:26)
2021-06-18T08:56:20.7248829Z at com.sonar.security.analysis.D.J$_B.A(na:2328)
2021-06-18T08:56:20.7250967Z ##[error]at com.sonar.security.analysis.D.C.A(na:2373)
at com.sonar.security.analysis.D.J.A(na:2625)
at com.sonar.security.analysis.D.K.C(na:405)
at com.sonar.security.analysis.D.K.A(na:2439)
2021-06-18T08:56:20.7254177Z at com.sonar.security.analysis.D.C.A(na:2373)
2021-06-18T08:56:20.7254918Z at com.sonar.security.analysis.D.J.A(na:2625)
2021-06-18T08:56:20.7255774Z at com.sonar.security.analysis.D.K.C(na:405)
2021-06-18T08:56:20.7256617Z at com.sonar.security.analysis.D.K.A(na:2439)
2021-06-18T08:56:20.7259559Z ##[error]at com.sonar.security.analysis.D.A.B(na:3336)
at com.sonar.security.analysis.D.A.C(na:978)
at com.sonar.security.analysis.D.E.A(na:2957)
at com.sonar.security.analysis.D.E.A(na:1060)
2021-06-18T08:56:20.7261621Z at com.sonar.security.analysis.D.A.B(na:3336)
2021-06-18T08:56:20.7262885Z at com.sonar.security.analysis.D.A.C(na:978)
2021-06-18T08:56:20.7263642Z at com.sonar.security.analysis.D.E.A(na:2957)
2021-06-18T08:56:20.7264508Z at com.sonar.security.analysis.D.E.A(na:1060)
2021-06-18T08:56:20.7265786Z ##[error]at com.sonar.security.analysis.D.E.A(na:1075)
ERROR:
2021-06-18T08:56:20.7268151Z at com.sonar.security.analysis.D.E.A(na:1075)
- steps to reproduce:
- Set the environment variable SONAR_SCANNER_OPTS to "-Xmx4G” in Azure DevOps Build Pipeline
- Trigger the first time analysis for the XL Project (> 5.5M LoC)
- Get the reported OutOfMemory error during the “Run Code Analysis” step
- potential workaround:
Increase the SONAR_SCANNER_OPTS parameter value even further which may cause a resource bottleneck on the shared Build Machine