SonarAnalyzerException: Exit code 139 for cpp-file

Hello there,

I need help with analysis error for C++ files.

Basics:

  • SonarQube v10.5.1, deployed via zip-File, Developer-Edition (with license)
  • recently updated SonarQube from v10.1 directly to v10.5.1
  • using AzureDevOps to run analysis on SonarQube
  • since then, specific C++ projects fail in sonar scanner analysis with AnalyzerException. The logs say, that only specific cpp files can’t be analyzed.

I read threads about a similar problem, found the topic where C++23 may be an issue, because it is not fully supported. But then, why did it work with SonarQube v10.1, but not with v10.5.1?

A zip file “reproducer” was generated, but i do not want to share it publicily.

The following block is the output of the AzureDevOps pipeline in the SonarAnalyse step:

com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code 139: /__w/5/s/libs/Common/src/Timer.cpp
	at com.sonar.cpp.analyzer.Subprocess.lambda$execute$1(Subprocess.java:43)
	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:128)
	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:39)
	at com.sonar.cpp.analyzer.ReproducerRequester.requestReproducer(ReproducerRequester.java:37)
	at com.sonar.cpp.analyzer.AnalysisHandler.acceptResult(AnalysisHandler.java:72)
	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:128)
	at com.sonar.cpp.plugin.CFamilySensor.lambda$process$8(CFamilySensor.java:604)
	at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:58)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
ERROR: Exception in thread pool-5-thread-28
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code 139: /__w/5/s/libs/Common/src/Timer.cpp
	at com.sonar.cpp.analyzer.Subprocess.lambda$execute$1(Subprocess.java:43)
	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:128)
	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:39)
	at com.sonar.cpp.analyzer.ReproducerRequester.requestReproducer(ReproducerRequester.java:37)
	at com.sonar.cpp.analyzer.AnalysisHandler.acceptResult(AnalysisHandler.java:72)
	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:128)
	at com.sonar.cpp.plugin.CFamilySensor.lambda$process$8(CFamilySensor.java:604)
	at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:58)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)

Hello,

From what I can tell, this was fixed with the upgrade to clang’s frontend 18.1.4. There were many changes when pulling from upstream, so I can not easily pinpoint a single ticket,

Anyway, upgrading to SonarQube 10.6 should fix the problem. Would it be possible to do so?

Hi,

I will perform the upgrade on our test system and try to run the same analysis.

Hi there,

I upgraded to SonarQube v10.6 and ran the test. It works, but it seems not to analyze all cpp files.
My test system does not have a license and runs on community edition.
I will upgrade my prod system and look if this solves it.

Thanks for the help :slight_smile:

1 Like

FYI: The update to 10.6 did solve the issue.