We faced this issues with out setup

Hello! We faced this issue with our setup. Can you help me to deal with it?

> Task :sonarqube
525
526 > Task :sonarqube FAILED
527 FAILURE: Build failed with an exception.
528 Daemon will be stopped at the end of the build after running out of JVM memory
529
530
531 * What went wrong:
532 Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
533 Execution failed for task ':sonarqube'.
534
535 > Metaspace
536 You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
537 
538 
539 * Try:
540 See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
541 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
542 119 actionable tasks: 119 executed
543 
544 * Get more help at https://help.gradle.org
545 
546 BUILD FAILED in 5m 15s
547 Error: Process completed with exit code 1.

Hi @kpelikhovsky

Can you please run with the --stacktrace --info option and provide us the formatted log?

@Dorian_Burihabwa here is the output, saying we are out of memory. We haven’t changed nothing there.

> Task :sonarqube FAILED
6697 :sonarqube (Thread[Execution worker for ':',5,main]) completed. Took 58.24 secs.
6698
6699
6700 FAILURE: Build failed with an exception.
6701 Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
6702
6703
6704 * What went wrong:
6705 You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
6706 Execution failed for task ':sonarqube'.
6707
6708 > Metaspace
6709 See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
6710
6711 119 actionable tasks: 119 executed
6712 * Try:
6713 Run with --debug option to get more log output. Run with --scan to get full insights.
6714
6715 * Exception is:
6716 org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':sonarqube'.
6717	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:188)
6718	at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:263)
6719	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:186)
6720	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:174)
6721	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
6722	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
6723	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
6724	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
6725	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
6726	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
6690	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
6691	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
6692	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
6693	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
6694	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
6695	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
6696	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
6697	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
6698	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
6699	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
6700	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:79)
6701	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
6702	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:79)
6703	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
6704	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
6705	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408)
6706	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395)
6707	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388)
6708	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374)
6709	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
6710	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
6711	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
6712	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
6713	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
6714	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
6715	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
6716 Caused by: java.lang.OutOfMemoryError: Metaspace
6717
6718
6719 * Get more help at https://help.gradle.org
6720
6721 BUILD FAILED in 5m 10s
6722 Watching 964 directories to track changes
6723 Expiring Daemon due to JVM Metaspace space being exhausted
6724 Daemon will be stopped at the end of the build after running out of JVM memory
6725 Error: Process completed with exit code 1.

@Dorian_Burihabwa any ideas why we hit this “JVM Metaspace space being exhausted” issue?

@kpelikhovsky Do you know if the size of the Metaspace is explicitly limited for your runtime? Do you see this issue on your local machine or in your CI? If it is in CI,

Just so that we can be the most helpful, could you share whether you are scanning against SonarCloud or SonarQube? And if you are using SQ, which version?

@Dorian_Burihabwa We followed the instructions for connecting SonarCloud. So it should be SQ 3.3

Thanks @kpelikhovsky, it looks like the issue happens when running as a GitHub action. The default memory configuration for these runners is an issue.

Before trying to modify these values, did you manage to analyze your project locally?

@kpelikhovsky Any news?