Sonar-scanner issue com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code -1073740791

SonarQube server:
Windows Server 2019 10.0 amd64
Microsoft Visual Studio 2022 (64 bit)

Hi Community,
We are trying to analyse our C++ code with using sonar-scanner. But, during the sonar-scanner execution we have faced with the following error:

0:30:25.000141100 INFO Reached stage: symbolic execution
00:30:25.000141100 DEBUG Reproducer logs:
00:30:25.000141100 INFO Requesting reproducer for: C:/Users/user/SOME_PROJECT/Some_File.cpp
00:30:29.734508 ERROR Exception in thread pool-2-thread-1
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code -1073740791: C:/Users/user/SOME_PROJECT/Some_File.cpp
	at com.sonar.cpp.analyzer.AnalysisHandler.acceptResult(
	at com.sonar.cpp.analyzer.Subprocess.execute(
	at com.sonar.cpp.plugin.CFamilySensor.lambda$process$19(
	at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(
	at java.base/java.util.concurrent.Executors$ Source)
	at java.base/ Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$ Source)
	at java.base/ Source)

On Sonar Community pages I’ve found the similar issue: ERROR: Exception in thread ... com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: - #2 by mpaladin, where you recommend to use -DBOOST_ASIO_DISABLE_NOEXCEPT option during the build.
In our case we are using Microsoft Visual Studio 2022 (64 bit) and run the build with using msbuild.exe.
Could you please clarify how to use DBOOST_ASIO_DISABLE_NOEXCEPT with msbuild.exe command?

Thank you for your advice!

Hi @yevhenhnes and thanks for sharing the problem with us,

I think that the thread you are referring to is likely to be a different problem, as the issue described there was fixed in version 6.19 of the CFamily analyzer, and you have mentioned you are using SQ 9.9.2 (which corresponds to version 6.41 of the CFamily analyzer).

To help investigate the problem further, would it be possible for you to share the file that gets generated along with the scanner commands being used with us?

Let us know if you prefer to share these files in private.

Best regards,

Hi @michael.jabbour, thank you for your reply. Could you please write me a PM and I’ll reply to you with reproduce file.
Or tell me how can I write private message?

Note: the reproducer with similar problem were already shared privately by @yevhenhnes and we are looking at it together on the private thread.


Thank you!

The issue was identified privately and it wasn’t related to the CFamily analysis.
The problem was that the analysis was triggered using Winrm which has a low memory limit per shell by default.

The maximum amount of memory allocated per shell, including the shell’s child processes. The default is 1024 MB.

This means that the analysis was killed every time it consumed ~1GB of memory even if plenty of memory was available on the system. Changing the memory limit per shell fixed the issue.


1 Like

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