Deployment: Virtual Machine, Alma Linux 8.10, 32 GB ram
Version: Enterprise Edition v2025.1 (102418)
Upgraded our staging Enterprise server from v10.8 (100206) to v2025.1 (102418) and ran sonar analysis on continuous integration infrastructure and it failed to save the reported results (scan succeeded). This appears to be the same as problems reported at…
Between these releases our report size increased by around 100 MB scanning the same code base and now exceeds the limits of the Postgres database. I collected data from our production servers which is still running version 10.8 and compare it to different changes on the 2025.1 version to understand the impact of different changes to get analysis working again.
We have moved to ‘clean as you code’ model and use pull request analysis to gate commits to the monolithic repository that no new sonar issues are being introduced. Although breaking the sonar project down into smaller pieces fixes this report generation issue, this is not viable as developers work in all areas of the monolithic repository and validation of changes using pull request analysis to multiple sonar projects would be very difficult to implement.
Are there other alternatives for solving this issue? This issue is blocking upgrade to 2025.1 for our production server.
Other items of note that relates to this issue. We use our own quality profile (not “Sonar Way”) so there was no change in the rules applied during analysis. There were 8 rules added in the new release, and these new rules did make the problem considerably worse as well as increase scanning time significantly, but this is a separate issue.
Here is the error reported on the sonar enterprise servers when the saving the report fails.
Error Details: ENC [Project Analysis]
Error Details
java.lang.IllegalStateException: Fail to select data of CE task fe236d98-1946-45e8-bdc1-64daca360cc2
at org.sonar.db.ce.CeTaskInputDao.selectData(CeTaskInputDao.java:74)
at org.sonar.ce.task.projectanalysis.step.ExtractReportStep.execute(ExtractReportStep.java:67)
at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:79)
at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:70)
at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:57)
at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:75)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:212)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:194)
at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:160)
at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:76)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.postgresql.util.PSQLException: ERROR: invalid memory alloc request size 1161851657
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2733)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2420)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:372)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:517)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:434)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:194)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:137)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
at org.sonar.db.ce.CeTaskInputDao.selectData(CeTaskInputDao.java:67)
... 20 more