SonarScanner exception during analysis

  • ALM used: GitLab

  • CI system used: Gitlab CI/CD

  • Scanner command used when applicable: sonar-scanner -Dsonar.host.url=“https://sonarcloud.io” -Dsonar.token=“*” -Dproject.settings=.sonar.properties

  • Languages of the repository: C++

  • Error observed:

INFO: [pool-4-thread-1] /eps/firmware/bootloader/src/bootloader.cpp
INFO: Reached stage: symbolic execution
INFO: Requesting reproducer for: /eps/firmware/bootloader/src/bootloader.cpp
ERROR: Exception in thread pool-4-thread-1
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: /eps/firmware/bootloader/src/bootloader.cpp
        at com.sonar.cpp.analyzer.AnalysisHandler.acceptResult(AnalysisHandler.java:41)
        at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:113)
        at com.sonar.cpp.plugin.CFamilySensor.lambda$process$19(CFamilySensor.java:1031)
        at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:59)
        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:
  /eps/firmware/bootloader/src/bootloader.cpp

After changing CFamily plugin version from 6.37.0.60132 to 6.38.0.60268 SonarScanner started throwing exception despite no change in code. Only workaround for no is to exclude file that throws exception.

Let me know how to provide sonar-cfamily-reproducer.zip.

Hi @pszemoc,

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

Thanks,

Hi @pszemoc,

Thanks for the report!

This was fixed in 6.39 in this ticket: [CPP-3889] - Jira. The new release should be available in a week. Until then excluding the file is the best approach.

Sorry for the inconvenience.

Thanks,

1 Like

Thanks a lot!

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