Hi there,
I’m currently trying to configure SonarScanner to run on our code base, which is embedded C code, being compiled by a TI ARM compiler on windows. We are using SonarQube Enterprise Edition Version 9.9 (build 65466), running on company server, which uses CFamily plugin version: 6.41.0.60884. I’m getting the following errors in the log (starting from the start of the CFamily plugin, which seems the culprit):
INFO: Sensor CFamily [cpp]
INFO: CFamily plugin version: 6.41.0.60884
INFO: Using build-wrapper output: M:\TestSonarQube\bw-output\build-wrapper-dump.json
INFO: Available processors: 16
INFO: Using 16 threads for analysis.
INFO: Found empty cache on server
INFO: [pool-2-thread-1] M:/TestSonarQube/src/main.c
INFO: Reached stage: parsing
INFO: Requesting reproducer for: M:/TestSonarQube/src/main.c
ERROR: Exception in thread pool-2-thread-1
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code -1073741676: M:/TestSonarQube/src/main.c
at com.sonar.cpp.analyzer.Subprocess.lambda$execute$1(Subprocess.java:42)
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:113)
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:38)
at com.sonar.cpp.analyzer.ReproducerRequester.requestReproducer(ReproducerRequester.java:37)
at com.sonar.cpp.analyzer.AnalysisHandler.acceptResult(AnalysisHandler.java:39)
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:113)
at com.sonar.cpp.plugin.CFamilySensor.lambda$process$19(CFamilySensor.java:1074)
at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:58)
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$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
ERROR:
An error occurred while analyzing the following compilation unit:
M:/TestSonarQube/src/main.c
A file named "sonar-cfamily-reproducer.zip" has been generated to help the problem investigation.
Please contact SonarSource support providing the following file to help improving the analyzer:
M:\TestSonarQube\sonar-cfamily-reproducer.zip
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 12.886s
INFO: Final Memory: 38M/176M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException:
An error occurred while analyzing the following compilation unit:
M:/TestSonarQube/src/main.c
A file named "sonar-cfamily-reproducer.zip" has been generated to help the problem investigation.
Please contact SonarSource support providing the following file to help improving the analyzer:
M:\TestSonarQube\sonar-cfamily-reproducer.zip
at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:442)
at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:215)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:64)
at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:403)
at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:399)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:368)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:137)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
at org.sonarsource.scanner.cli.Main.main(Main.java:62)
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
Does the exception exit code already explain the issue in this case? I’m open to share the reproducer.zip privately when needed.
I’ve tried scaling down the codebase significantly, but no change in the error. Also tried some definitions to ignore/exclude some exceptions found online did not help.
Thank you in advance,
Kind regards,
Kevin