com.sonar.cpp.analyzer.Analyzer$AnalyzerException

  • Versions used (SonarQube, Scanner, Plugin, and any relevant extension)
$ sonar-scanner --version
INFO: Scanner configuration file: sonar-scanner-4.6.0.2311-linux/conf/sonar-scanner.properties
INFO: Project root configuration file: https://github.com/I2PC/xmippCore/blob/devel/sonar-project.properties
INFO: SonarScanner 4.6.0.2311
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Linux 5.8.0-45-generic amd64
$ build-wrapper-linux-x86-64 --version
build-wrapper, version 6.17 (linux-x86)
  • Error observed
INFO: Requesting reproducer for: xmipp/src/xmippCore/core/transformations.cpp
ERROR: Exception in thread pool-1-thread-1
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: xmipp/src/xmippCore/core/transformations.cpp
	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:81)
	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:78)
	at com.sonar.cpp.plugin.CFamilySensor.lambda$process$8(CFamilySensor.java:655)
	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: 
  xmipp/src/xmippCore/core/transformations.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:
  xmipp/sonar-cfamily-reproducer.zip

  • Steps to reproduce
build-wrapper-linux-x86-64 --out-dir bw-outputs ./xmipp noAsk
sonar-scanner -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=i2pc -Dsonar.login=XXX

I get the same error using scanner version 4.5.
I tried to run the scanner with -DBOOST_NO_CXX11_ALLOCATOR and with -DBOOST_ASIO_DISABLE_NOEXCEPT, but got the same error.
I have the sonar-cfamily-reproducer.zip ready for you, please PM me.

Hi @David_Strelak ,

if you are facing CPP-2696 you should try also to define ASIO_DISABLE_NOEXCEPT. If that doesn’t work I can send you a pm where you can share the reproducer archive.

Hi @mpaladin ,
unfortunately, I’m getting the same error:

$ sonar-scanner -X -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=i2pc -Dsonar.login=XXX -DASIO_DISABLE_NOEXCEPT
...
14:40:04.563 INFO: Requesting reproducer for: xmipp/src/xmippCore/core/transformations.cpp
14:40:05.489 ERROR: Exception in thread pool-1-thread-2
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: xmipp/src/xmippCore/core/transformations.cpp

Please send me PM then.
Please let me know if you are interested in the entire ‘sonar-cfamily-reproducer.zip’ zip, or just the ‘sonar-cfamily.reproducer’ file, and if I should attach report generated while using specific define.

Thanks

Hi @David_Strelak ,

I sent you a PM, please share the entire sonar-cfamily-reproducer.zip.

Hi @mpaladin ,

any update regarding this issue?

Thanks,

David S.

Hi @David_Strelak ,

let me apologize for the delay, it was a couple of pretty busy weeks, I didn’t forget you. I managed to give it a go today and I found the cause for the crash and will try to create a small reproducer. The cause is this unreachable line which makes Clang parser to crash: xmippCore/transformations.cpp at devel · I2PC/xmippCore · GitHub.

1 Like

Hi @David_Strelak ,

for the records I created a ticket on our side to track the issue: CPP-3057.

1 Like

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