Exception seen com.sonar.cpp.analyzer.Analyzer$AnalyzerException with new CFamily version

  • ALM used (Azure DevOps)
  • CI system used (Azure DevOps)
  • Languages of the repository ( C++ )
20:11:41.247092200 INFO Reached stage: configuration
20:11:41.247092200 DEBUG Reproducer logs:
20:11:41.247092200 DEBUG [PCH] D:/a/1/s/Backend/BaseObjects/TSbaseBO.cpp: using PCH
20:11:41.248033500 DEBUG [PCH] D:/a/1/s/Backend/BaseObjects/TSbaseBO.cpp: building PCH
20:11:41.248033500 INFO Requesting reproducer for: D:/a/1/s/Backend/BaseObjects/TSbaseBO.cpp
20:12:00.251061600 ERROR Exception in thread pool-7-thread-1
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code -2147483645: D:/a/1/s/Backend/BaseObjects/TSbaseBO.cpp
	at com.sonar.cpp.analyzer.AnalysisHandler.acceptResult(AnalysisHandler.java:67)
	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:128)
	at com.sonar.cpp.plugin.CFamilySensor.lambda$process$10(CFamilySensor.java:753)
	at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:58)
	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.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:840)

We’ve started seeing this issue in our Azure Quality Gate pipeline this Monday.
We suspect that it has to do with the CFamily plugin which seen to have been updated to version 6.56.72172. Our last green run was Friday using 6.55.0.70177.

Just to confirm we ran an analysis on a PR that had previously succeeded last week, and it failed this time around.
We can provide the reproducer if needed.
Thanks!

hi @brunodani,

Yes, there were many changes in 6.56 to analyze more files in the case of PCH and that might increase memory consumption.
I will ping you privately so you can share the full logs and the reproducer.
Can you try to increase the memory or reduce the number of threads?

Thanks,

FYI, we talked privately, and @brunodani is unblocked by disabling PCH.
We have a reproducer that will help us debug the issue.
I will update the thread with the ticket, and ETA once the root cause is identified.

1 Like

the problem is fixed in CFamily 6.57 which should go live on SC next week:
https://sonarsource.atlassian.net/browse/CPP-5415