Failed background task since upgrade to 8.2

Hello all,
Today I upgraded our SonarQube Server from 8.1 Dev to 8.2 Dev. Since then I am facing issues with failed background tasks I cannot get rid of.

For example, there are two pull requests that were analysed successfully yesterday with 8.1 but ran into the following error with the new version 8.2.

Error Details
org.sonar.ce.task.projectanalysis.component.VisitException: Visit failed for Component {key=lmda:LMDA:PULL_REQUEST:2352,type=DIRECTORY}  located lmda:PULL_REQUEST:2352(type=PROJECT)
	at org.sonar.ce.task.projectanalysis.component.VisitException.rethrowOrWrap(VisitException.java:44)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visit(PathAwareCrawler.java:52)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visitChildren(PathAwareCrawler.java:87)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visitImpl(PathAwareCrawler.java:70)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visit(PathAwareCrawler.java:50)
	at org.sonar.ce.task.projectanalysis.step.PersistComponentsStep.execute(PersistComponentsStep.java:114)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:81)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:72)
	at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:59)
	at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:81)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:209)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:191)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:158)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:133)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:85)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	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:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalArgumentException: Component name can't be empty
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:142)
	at org.sonar.db.component.ComponentValidator.checkComponentName(ComponentValidator.java:40)
	at org.sonar.db.component.ComponentDto.setName(ComponentDto.java:316)
	at org.sonar.ce.task.projectanalysis.step.PersistComponentsStep$PersistComponentStepsVisitor.createForDirectory(PersistComponentsStep.java:302)
	at org.sonar.ce.task.projectanalysis.step.PersistComponentsStep$PersistComponentStepsVisitor.visitDirectory(PersistComponentsStep.java:211)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visitNode(PathAwareCrawler.java:99)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visitImpl(PathAwareCrawler.java:67)
	at org.sonar.ce.task.projectanalysis.component.PathAwareCrawler.visit(PathAwareCrawler.java:50)
	... 23 more

In the background we use a Postgre SQL DB 9.6. I already reindexed the database without any change to the analysis of the pull requests.
We use Azure DevOps in combination with SonarQube. In the Azure Pipeline, the Publish Quality Gate Results step throws the above mentioned error, not the Code Analsys.

Hi,
It looks like the problem is related with the structure of the project being analyzed. If it affects pull requests, it probably doesn’t depend on what’s in the DB.
Could you please post the logs of the code analysis, preferably with debug enabled?

Hi @dmeneses,

After additional google searches I found this discussion. The proposed solution was to exclude the source files of the failing pull request from the sonarqube analysis. This solved the issue. The failed pull requests completed successfully. I included the source files afterwards.

I hope this issue is just a random hick up and does not reoccur with other pull request touching the same source files.

Ok, thanks for the update. Please report back if you continue to see the problem.

See SonarQube 8.2 Failed Background for the solution