Error message: Compute Engine Task is failing with error - Analysis in error cannot have measures

  • SonarQube version 9.9.4.87374
  • how is SonarQube deployed: zip

Some compute engine tasks are failing with the following error:

2024.04.21 20:15:43 INFO  ce[][o.s.c.t.CeWorkerImpl] Execute task | project=com.abc:xyz | type=REPORT | pullRequest=222 | id=AY8CTKTFsE5T5xWXQ56_ | submitter=backend
2024.04.21 20:15:43 INFO  ce[AY8CTKTFsE5T5xWXQ56_][o.s.c.t.s.ComputationStepExecutor] Extract report | status=SUCCESS | time=52ms
2024.04.21 20:15:43 INFO  ce[AY8CTKTFsE5T5xWXQ56_][o.s.c.t.s.ComputationStepExecutor] Persist scanner context | status=SUCCESS | time=7ms
2024.04.21 20:15:43 INFO  ce[AY8CTKTFsE5T5xWXQ56_][o.s.c.t.s.ComputationStepExecutor] Propagate analysis warnings from scanner report | status=SUCCESS | time=4ms
2024.04.21 20:15:43 INFO  ce[AY8CTKTFsE5T5xWXQ56_][o.s.c.t.s.ComputationStepExecutor] Generate analysis UUID | status=SUCCESS | time=0ms
2024.04.21 20:15:43 INFO  ce[AY8CTKTFsE5T5xWXQ56_][o.s.c.t.s.ComputationStepExecutor] Load analysis metadata | status=SUCCESS | time=5ms
2024.04.21 20:15:43 INFO  ce[AY8CTKTFsE5T5xWXQ56_][o.s.c.t.s.ComputationStepExecutor] Initialize | status=SUCCESS | time=10ms
2024.04.21 20:15:43 INFO  ce[AY8CTKTFsE5T5xWXQ56_][o.s.c.t.s.ComputationStepExecutor] Build tree of components | components=6 | status=SUCCESS | time=22ms
2024.04.21 20:15:43 INFO  ce[AY8CTKTFsE5T5xWXQ56_][o.s.c.t.s.ComputationStepExecutor] Validate project | status=FAILED | time=5ms
2024.04.21 20:15:43 INFO  ce[AY8CTKTFsE5T5xWXQ56_][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Webhooks | globalWebhooks=0 | projectWebhooks=0 | status=SUCCESS | time=4ms
2024.04.21 20:15:45 ERROR ce[AY8CTKTFsE5T5xWXQ56_][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Execution of task class com.sonarsource.F.D.d failed
java.lang.IllegalStateException: Analysis in error cannot have measures
	at com.sonarsource.F.D.G.C.A$1.B(Unknown Source)
	at com.sonarsource.F.D.G.C.B.A(Unknown Source)
	at com.sonarsource.F.D.G.O.A(Unknown Source)
	at com.sonarsource.F.D.G.O.B(Unknown Source)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at com.sonarsource.F.D.G.O.A(Unknown Source)
	at com.sonarsource.F.D.G.I.A(Unknown Source)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
	at com.sonarsource.F.D.G.I.A(Unknown Source)
	at com.sonarsource.F.D.d.A(Unknown Source)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at com.sonarsource.F.D.d.A(Unknown Source)
	at com.sonarsource.F.D.d.B(Unknown Source)
	at org.sonar.ce.async.SynchronousAsyncExecution.addToQueue(SynchronousAsyncExecution.java:27)
	at com.sonarsource.F.D.d.A(Unknown Source)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at com.sonarsource.F.D.d.finished(Unknown Source)
	at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.executeTask(PostProjectAnalysisTasksExecutor.java:102)
	at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.finished(PostProjectAnalysisTasksExecutor.java:93)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeListener(ComputationStepExecutor.java:89)
	at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:61)
	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:74)
	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:842)
2024.04.21 20:15:45 INFO  ce[AY8CTKTFsE5T5xWXQ56_][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Pull Request decoration | status=FAILED | time=1684ms
2024.04.21 20:15:45 INFO  ce[AY8CTKTFsE5T5xWXQ56_][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Report branch Quality Gate status to devops platforms | status=SUCCESS | time=0ms
2024.04.21 20:15:45 INFO  ce[AY8CTKTFsE5T5xWXQ56_][o.s.c.t.CeWorkerImpl] Executed task | project=com.abc:xyz | type=REPORT | pullRequest=222 | id=AY8CTKTFsE5T5xWXQ56_ | submitter=backend | status=FAILED | time=1847ms

Not sure what it means and how I can resolve this.

Hey there.

That’s a tricky one. Do you have any community supported plugins installed on your SonarQube server? If so, could you list them here?

Hi,

I haven’t installed any plugins on my sonarqube server. I check inside the <sonarqubeHome>/extensions/plugins directory and it is empty.

Thanks. I don’t have a clue how to debug this (and I’ve never seen this error message before)

In the meantime, I think you can get past this error if you disable the summary comment for affected projects (project-level Project Settings > General Settings > DevOps Platform Integration > Enable analysis summary under the GitHub Conversation tab

What does “Enable analysis summary under the GitHub Conversation tab” actually do? The description states
. When enabled, a summary is displayed under the GitHub Conversation tab. Notifications may be sent by GitHub depending on your settings.
There’s a comment under my Github PR as shown in the image, if I disable the analysis summary will it impact the comment left on the PR?

Yes, it will disable the comment. You’ll still receive the PR status check, though.

1 Like

Hi @rrutum,

This can happen when two analyses on the same PR start almost at the same time. A race condition leads to this error.

If you have a look at the background tasks, the failed task should be close (in time) to another one.

We had a ticket for this but it was closed as it’s a rare edge case.
We could reopen it if we receive more feedback on this issue.

Best