SonarScanner C++/Linux crash

  • which versions are you using: SonarQube Version 9.6.1 (build 59531)
  • how is SonarQube deployed: zip

The build wrapper works fine but the scanner crashes.

18:37:38.401 INFO: CFamily plugin version: 6.36.0.52033
18:37:38.402 INFO: Using build-wrapper output: /home/ghrunner/actions-runner/_work/VaaS-DSP-Dev_Camera-L6C-LPRApp-Linux/VaaS-DSP-Dev_Camera-L6C-LPRApp-Linux/bw-output/build-wrapper-dump.json
18:37:38.408 INFO: Available processors: 2
18:37:38.411 INFO: Using 2 threads for analysis.
18:37:38.413 DEBUG: Unpacking analyzer to: /home/ghrunner/actions-runner/_work/VaaS-DSP-Dev_Camera-L6C-LPRApp-Linux/VaaS-DSP-Dev_Camera-L6C-LPRApp-Linux/.scannerwork/.sonartmp/3977617917966549092
18:37:41.290 DEBUG: Not enough content in 'CDEngine/RawDetection/VT/BitmapUtility_VT.h' to have CPD blocks, it will not be part of the duplication detection
18:37:41.916 DEBUG: Not enough content in 'CDEngine/App/DfcGlobalCDEngine.h' to have CPD blocks, it will not be part of the duplication detection
18:37:42.494 DEBUG: Not enough content in 'MachineLearningTRT-GPU/src/PostProcessing/PostProcessing.h' to have CPD blocks, it will not be part of the duplication detection
18:37:42.596 DEBUG: Not enough content in 'FaceTracking/App/AppInfo.h' to have CPD blocks, it will not be part of the duplication detection
18:37:43.403 DEBUG: Not enough content in 'CDEngine/RawDetection/VN/BitmapUtility_VN.h' to have CPD blocks, it will not be part of the duplication detection
18:37:43.565 DEBUG: Not enough content in 'CDEngine/RawDetection/Engine_CS/DetectionEngine/Tracking/TrackingProcess.cpp' to have CPD blocks, it will not be part of the duplication detection
18:37:44.201 DEBUG: Not enough content in 'CDEngine/RawDetection/GENERAL_STATE_2/BitmapUtility_FULL_2.h' to have CPD blocks, it will not be part of the duplication detection
18:37:44.203 DEBUG: Not enough content in 'FaceTracking/JSON/json.h' to have CPD blocks, it will not be part of the duplication detection
18:37:44.640 DEBUG: Not enough content in 'CDEngine/RawDetection/VT/BitmapUtility_VT.cpp' to have CPD blocks, it will not be part of the duplication detection
18:37:44.645 DEBUG: Not enough content in 'MyMFC/include/pch.h' to have CPD blocks, it will not be part of the duplication detection
18:37:45.257 DEBUG: Not enough content in 'CDEngine/RawDetection/GENERAL_STATE_3/BitmapUtility_FULL_3.h' to have CPD blocks, it will not be part of the duplication detection
18:37:45.662 DEBUG: Not enough content in 'DfcLibrary/Include/DfcIniFile.h' to have CPD blocks, it will not be part of the duplication detection
18:37:45.663 DEBUG: Not enough content in 'CDEngine/RawDetection/RI_New/BitmapUtility_RI_New.h' to have CPD blocks, it will not be part of the duplication detection
18:37:45.676 DEBUG: Not enough content in 'CDEngine/RawDetection/GENERAL_STATE/BitmapUtility_FULL.h' to have CPD blocks, it will not be part of the duplication detection
18:37:45.882 DEBUG: Not enough content in 'CDEngine/RawDetection/Engine_CS/DetectionEngine/Detection/TempDrawObject.h' to have CPD blocks, it will not be part of the duplication detection
18:37:46.124 DEBUG: Not enough content in 'MachineLearningTRT-GPU/src/PostProcessing/ObjectClassificationPostProcessing.h' to have CPD blocks, it will not be part of the duplication detection
18:37:46.129 DEBUG: Not enough content in 'MyMFC/include/afxtempl.h' to have CPD blocks, it will not be part of the duplication detection
18:37:46.158 DEBUG: Not enough content in 'MyMFC/include/MyMFC.h' to have CPD blocks, it will not be part of the duplication detection
18:37:46.232 DEBUG: Not enough content in 'CDEngine/RawDetection/RI/BitmapUtility_RI.h' to have CPD blocks, it will not be part of the duplication detection
18:37:46.262 DEBUG: Not enough content in 'CDEngine/App/VersionNo.h' to have CPD blocks, it will not be part of the duplication detection
18:37:46.416 DEBUG: Not enough content in 'MyMFC/include/stdafx.h' to have CPD blocks, it will not be part of the duplication detection
18:37:46.448 INFO: Found empty cache on server
18:37:46.478 DEBUG: eslint-bridge server will shutdown
18:37:47.116 INFO: ------------------------------------------------------------------------
18:37:47.116 INFO: EXECUTION FAILURE
18:37:47.117 INFO: ------------------------------------------------------------------------
18:37:47.117 INFO: Total time: 42.072s
18:37:47.273 ERROR: Error during SonarScanner execution
18:37:47.273 INFO: Final Memory: 82M/277M
java.lang.IllegalStateException: java.nio.file.NoSuchFileException: /home/ghrunner/actions-runner/_work/VaaS-DSP-Dev_Camera-L6C-LPRApp-Linux/VaaS-DSP-Dev_Camera-L6C-LPRApp-Linux/bw-output/build-wrapper-dump.json
18:37:47.273 INFO: ------------------------------------------------------------------------
	at com.sonar.cpp.plugin.BuildWrapperJsonReader.readCaptures(BuildWrapperJsonReader.java:90)
	at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:781)
	at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:388)
	at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:202)
	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:81)
	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:396)
	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:392)
	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:361)
	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:135)
	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.execute(Batch.java:66)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	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:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.nio.file.NoSuchFileException: /home/ghrunner/actions-runner/_work/VaaS-DSP-Dev_Camera-L6C-LPRApp-Linux/VaaS-DSP-Dev_Camera-L6C-LPRApp-Linux/bw-output/build-wrapper-dump.json
	at java.base/sun.nio.fs.UnixException.translateToIOException(Unknown Source)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
	at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(Unknown Source)
	at java.base/java.nio.file.Files.newByteChannel(Unknown Source)
	at java.base/java.nio.file.Files.newByteChannel(Unknown Source)
	at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(Unknown Source)
	at java.base/java.nio.file.Files.newInputStream(Unknown Source)
	at java.base/java.nio.file.Files.newBufferedReader(Unknown Source)
	at java.base/java.nio.file.Files.newBufferedReader(Unknown Source)
	at com.sonar.cpp.plugin.BuildWrapperJsonReader.getReader(BuildWrapperJsonReader.java:95)
	at com.sonar.cpp.plugin.BuildWrapperJsonReader.readCaptures(BuildWrapperJsonReader.java:56)
	... 31 more

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your upgrade path is:

9.6.1 → 9.9.4 → 10.4 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

1 Like

I don’t have any control over the version we use.

Turns out this was caused by me setting the output directory incorrectly. Would be more useful to give that kind of feedback than “please upgrade”.