We have been using SonarQube and SonarQube Scanner (deployed using zip) in our project for quite a while without any problems. We recently upgraded SonarQube from 8.9 LTS to 9.9 LTS and Scanner from 4.7 to 5.0, in the process we also moved from using the build wrapper to using compile_commands.json as input, we were generating that file for other purposes anyway.
After the upgrade the scan fails with the error below. I can provide the sonar-cfamily-reproducer.zip privately if necessary.
13:52:51.964206452 DEBUG Reproducer logs:
13:52:51.968830551 INFO Requesting reproducer for: <name_removed>.C
13:53:04.729128396 ERROR Exception in thread pool-2-thread-5
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code 139: <name_removed>.C
at com.sonar.cpp.analyzer.AnalysisHandler.acceptResult(AnalysisHandler.java:40)
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)
13:54:58.463006267 ERROR
An error occurred while analyzing the following compilation unit:
<name_removed>.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:
sonar-cfamily-reproducer.zip
java.lang.IllegalStateException:
An error occurred while analyzing the following compilation unit:
<name_removed>.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:
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)