Reached stage: symbolic execution and Exit code != 0

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.

Thank you

Hi @daniele.ferro,

I sent you a PM where you can upload the reproducer.
Until we investigate, you can exclude DevelopDataCollectorRt.cpp to unblock the analysis.

Thanks,

Hello @daniele.ferro,

Thanks for the reproducer.

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.

Thanks,

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 !

1 Like

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