Analyzer exception while scanning C Code

SonarScanner 4.4.0.2170

While scanning a project that includes C, C++ code, the “Run Code Analysis” task on Azure DevOps ends in failure - I can share the debug logs privately if required. I also learnt about a property sonar.cfamily.reproducer but not sure how to use that. Hence, I can share that file if required - please let me know how to use it?

01:29:08.619 INFO: Requesting reproducer for: C:\vstsagent\_work\14\s\SOURCE\civetweb\src\civetweb.c

##[error]01:29:12.069 ERROR: Exception in thread pool-3-thread-1

com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: C:\vstsagent\_work\14\s\SOURCE\civetweb\src\civetweb.c

at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:76)

at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:73)

at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:33)

at com.sonar.cpp.plugin.CFamilySensor.lambda$process$5(CFamilySensor.java:503)

at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:53)

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:834)

01:29:12.069 ERROR: Exception in thread pool-3-thread-1

com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: C:\vstsagent\_work\14\s\SOURCE\civetweb\src\civetweb.c

at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:76)

at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:73)

at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:33)

at com.sonar.cpp.plugin.CFamilySensor.lambda$process$5(CFamilySensor.java:503)

at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:53)

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:834)

Hello @gischethans,

I sent you a PM

Hello @gischethans,

Thanks for the provided reproducer, the issue is identified I created this ticket to fix it. Feel free to watch it.
Note that the crash is happening on civetweb.c which I believe is a part of a dependency. I recommend excluding all external libraries from the analysis. This way, we analyze only the relevant code and the analysis becomes much faster since it doesn’t have to analyze all the irrelevant files.

Thanks,

1 Like

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