Alessandro Solimando created CALCITE-6484:
---------------------------------------------
Summary: Sonar analysis fails intermittently due to OOM
Key: CALCITE-6484
URL: https://issues.apache.org/jira/browse/CALCITE-6484
Project: Calcite
Issue Type: Bug
Components: tests
Affects Versions: 1.37.0
Reporter: Alessandro Solimando
Assignee: Alessandro Solimando
Sometimes the Sonar analysis fails due to OOM, here an [example of CI
logs|https://ci-builds.apache.org/blue/organizations/jenkins/Calcite%2FCalcite-sonar/detail/PR-3858/9/pipeline/].
In what follows the relevant extract:
{code:java}
The Daemon will expire after the build after running out of JVM heap space.
The project memory settings are likely not configured or are configured to an
insufficient value.
The daemon will restart for the next build, which may increase subsequent build
times.
These settings can be adjusted by setting 'org.gradle.jvmargs' in
'gradle.properties'.
The currently configured max heap space is '1 GiB' and the configured max
metaspace is '512 MiB'.
For more information on how to set these values, please refer to
https://docs.gradle.org/8.7/userguide/build_environment.html#sec:configuring_jvm_memory
in the Gradle documentation.
To disable this warning, set
'org.gradle.daemon.performance.disable-logging=true'.
> Task :sonar FAILED
Build calcite FAILURE reason:
Execution failed for task ':sonar':
java.lang.OutOfMemoryError: Java heap space
at B.A.A.A.A.F.<init>(na:2438)
at B.A.A.A.A.D$_D.<init>(na:1146)
at B.A.A.A.A.D.iterator(na:1079)
at com.sonarsource.A.A.E.G$_C.D(na:2233)
at com.sonarsource.A.A.C.E.A(na:972)
at com.sonarsource.A.A.C.E.C(na:2276)
at com.sonarsource.A.A.C.E.B(na:3115)
at com.sonarsource.A.A.Y.A(na:3332)
at com.sonarsource.A.A.Y.A(na:2596)
at com.sonarsource.A.A.Y.E(na:1668)
at com.sonarsource.A.A.Y.A(na:943)
at com.sonarsource.A.A.Y.A(na:377)
at com.sonarsource.A.A.Y.A(na:2750)
at com.sonarsource.A.H.executeChecksOnFunction(na:1449)
at com.sonarsource.A.H.executeChecks(na:2587)
at com.sonarsource.A.H.executeSensor(na:3171)
at com.sonarsource.A.H.execute(na:1926)
at
org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:63)
at
org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
at
org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:51)
at
org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
at
org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at
org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at
org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:192)
at
org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:188)
at
org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:159)
at
org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at
org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at
org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:399)
at
org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at
org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at
org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:131)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sonar'.
> Java heap space {code}
At the top of the quoted text, it's recommended to increase the memory settings
via the parameter 'org.gradle.jvmargs' in 'gradle.properties'.
Since most of the time the analysis succeeds, we probably need a small
increment at first to see if the situation improves (max heap space is now '1
GiB', max metaspace is '512 MiB').
It's detrimental to have CI failures as they not only deprive us from the sonar
analysis, but they also contributed to the sentiment that flakyness in CI is
OK, while we should aim at 100% green CI unless there is a real problem.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)