While executing the sonar-scanner process for my project, the following errors come up:
12:03:54.917231 INFO Reached stage: symbolic execution
...
12:04:12.830992 ERROR Exception in thread pool-4-thread-4
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: /home/daniele/work/maestro/repos/maestro-FW/modules/data_collector/develop-data-collector-rt/DevelopDataCollectorRt.cpp
at com.sonar.cpp.analyzer.AnalysisHandler.acceptResult(AnalysisHandler.java:41)
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:113)
at com.sonar.cpp.plugin.CFamilySensor.lambda$process$19(CFamilySensor.java:1031)
at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:59)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor
Iām scanning a c++ code (c++17) on linux x86. I have a sonar-cfamily-reproducer.zip file and can share in PM, if needed to analyze the problem.
My guess is that the analysis of that file requires a lot of memory.
How much ram is available on the machine where you are running the analysis? Can you try to increase it?
If you try to analyze that file separately would it crash? for example by setting sonar.sources to /home/daniele/work/maestro/repos/maestro-FW/modules/data_collector/develop-data-collector-rt/DevelopDataCollectorRt.cpp.
If it works when you analyze the file on its own, then you can try to reduce the sonar.cfamily.threads number or increase memory.
The analysis was performed on a machine with 8 GB ram.
After setting the number of threads at 2, the problem has been solved and the scanner completed successfully.
Thank you for your support !