SonarCloud analysis failing with CFamily plugin version: 6.31.0.44497

  • Sonar Cloud connected to Azure DevOps
  • INFO: SonarScanner 4.6.2.2472
  • INFO: Java 16.0.1 Oracle Corporation (64-bit)
  • INFO: Windows 10 10.0 amd64

Running the analysis from the pipeline stops with several of these errors

##[error]ERROR: Exception in thread pool-2-thread-1
java.lang.IllegalStateException: 
	at com.sonar.cpp.jni.FileSystemOperations.realPath(FileSystemOperations.java:50)
	at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1224)
	at com.sonar.cpp.fs.CanonicalPathCache.computeIfAbsent(CanonicalPathCache.java:17)
	at com.sonar.cpp.plugin.CFamilySensor.inputFile(CFamilySensor.java:962)
	at com.sonar.cpp.plugin.CFamilySensor.inputFile(CFamilySensor.java:955)
	at com.sonar.cpp.plugin.CFamilySensor.save(CFamilySensor.java:908)
	at com.sonar.cpp.plugin.CFamilySensor.lambda$process$14(CFamilySensor.java:797)
	at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:59)
	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.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:831)

This started happening a few days ago, until then everything worked fine.
The last successful analysis used CFamily plugin version: 6.30.0.42324
Now we are using CFamily plugin version: 6.31.0.44497 and the analysis fails consistently.

I can provide the “wrapper out” files
Thanks

Hello @francesco.salis,

Can you share the full scanner logs? Also, the build-wrapper JSON/logs.

We changed how we compute the path in 6.31. It should be more robust in checking the validity of the path.

Thanks,

Hello @Abbas , thanks for your reply.

I can share the logs and files, but I’d like to do that in private.
Is this possible?

Thanks

@francesco.salis, I sent you a PM to share them in private.

Thanks,

We have encountered this issue as well. Following with interest. @Abbas please “@” me if I can provide anything of use.

Hi @Ben_Ernst,

I’m still waiting for a cfamily.reproducer file from @francesco.salis to confirm the exact root cause of the issue.

Meanwhile, we deployed a new version: CFamily 6.32. When you run the analysis, you can check if it is picked up and if it fixes the issue? We fixed many issues and yours might be one of them.

If not, I will send you a private message where you can share your logs.

Thanks,

1 Like

Thanks, @francesco.salis, for the cfamily.reproducer. I had a look at it and it is one of the issues that we fixed with 6.32. Retregirring the analysis should lead to a successful analysis.

Done it, and it is in fact fixed.
Thanks @Abbas

We no longer see this issue either

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.