C++ analyze crash after update from 9.7.1 to 9.9.1

which versions are you using:
SonarQube 9.9.1 deployed: zip (before update its works fine on 9.7.1 and 6.38.0 CFamilyPlugin)
CFamilyPlugin 6.41.0
After update from 9.7.1 to 9.9.1 LTS some C++ developers face error analyze C++ code with error:

13:51:19.809079 ERROR Exception in thread pool-4-thread-14
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code 139: /home/jenkins/agent/workspace/PROCESSINGHUB/Tests/topchakdv/autobuild_release_test/build/core/src/lib/system/network/poll.cpp
	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(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
...
java.lang.IllegalStateException: 
An error occurred while analyzing the following compilation unit: 
  /home/jenkins/agent/workspace/PROCESSINGHUB/Tests/topchakdv/autobuild_release_test/build/core/src/lib/system/network/poll.cpp
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:
  /home/jenkins/agent/workspace/PROCESSINGHUB/Tests/topchakdv/autobuild_release_test/build/core/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.executeTask(Batch.java:98)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
	at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
	at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)

We cannot understand which line of code crash analyze. I can share reproducer zip privately. please send a PM so I can share it privately.

Hey there.

Thanks for the report. Can you try SonarQube v9.9.2 LTS? It includes some fixes for C/C++ analysis and is the latest patch release for the LTS.

I cannot find in your jira: what problem was fixed in 9.9.2 LTS [SONAR-19768] - Jira
We cannot “fast” update bc of company policy. Only on stage env we can perform update to 9.9.2 and test, but we need to know - what was fixed

Hey there.

A change made specifically between SonarQube v9.7 and v9.9.1 broke C/C++ analysis in some cases, and was fixed in SonarQube v9.9.2. I have to insist you try this out on your staging instance to see if it fixes the issue before troubleshooting further.

At 9.9.2 LTS same error. I think our developers use same not supported C++ annotations in code
Can i share reproducer privately?

hi @Deadstar2011,

I sent you a PM where you can upload the reproducer.

Thanks,

Hi @Deadstar2011, the shared reproducer shows that you are still using 9.9.1 and not 9.9.2.
Do you have the reproducer from 9.9.2?

Thanks,

I think u miss 9.9.1 with 9.9.2 in message.
Ye, we downgrade stage server to 9.9.1 to be equal to prom
But its shows same error

1 Like

Hi @Deadstar2011,

I analyzed your reproducer file with version 9.9.1, and it crashed, as expected. But then I analyzed it with version 9.9.2, and it no longer crashed.

Are you sure you still encounter the crash in 9.9.2? If so, can you send us a reproducer generated with this version?

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