asolimando commented on code in PR #3864: URL: https://github.com/apache/calcite/pull/3864#discussion_r1685464480
########## gradle.properties: ########## @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -org.gradle.jvmargs=-XX:+UseG1GC -Xmx1g -XX:MaxMetaspaceSize=512m Review Comment: Yes, these `jvmargs` are used also locally, by setting `-Xmx300m` I get the same error as in CI: > > Task :linq4j:compileJava > Note: Some input files use unchecked or unsafe operations. > Note: Recompile with -Xlint:unchecked for details. > The Daemon will expire immediately since the JVM garbage collector is thrashing. > The project memory settings are likely not configured or are configured to an insufficient value. > The memory settings for this project must be adjusted to avoid this failure. > These settings can be adjusted by setting 'org.gradle.jvmargs' in 'gradle.properties'. > The currently configured max heap space is '304 MiB' 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'. So it's pretty much clear that low memory for the JVM can cause this error. What's troubling is that I had a build passing with `-Xmx512m` locally, while we had OOM with `-Xmx1g` in CI... Tangentially, I have also noticed this warning: > Configure project : > The 'sonarqube' task depends on compile tasks. This behavior is now deprecated and will be removed in version 5.x. To avoid implicit compilation, set property 'sonar.gradle.skipCompile' to 'true' and make sure your project is compiled, before analysis has started. > > The 'sonar' task depends on compile tasks. This behavior is now deprecated and will be removed in version 5.x. To avoid implicit compilation, set property 'sonar.gradle.skipCompile' to 'true' and make sure your project is compiled, before analysis has started. I am wondering if setting the suggested property, and building and running sonar in two separate Gradle commands would help by spawning a fresh single-use daemon: `./gradlew build --no-parallel --no-daemon` (or even `./gradlew build` as it's separate from Sonar?) and `./gradlew --no-parallel --no-daemon jacocoAggregateTestReport sonar -PenableJacoco -Porg.sonarqube.version=4.4.1.3373 -Dsonar.branch.name=${BRANCH_NAME} -Dsonar.login=${SONAR_TOKEN}` If all is good, subsequent tasks should not interfere with each others, so ideally there should not be any difference, but in practice the situation might be more complicated (my knowledge of Sonar is limited). WDYT? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
