SonarCloud Analysis Failed - run-scanner.sh: line 24

Version: sonarsource/sonarcloud-scan:1.0.1 (via BitBucket pipelines)

Error:
INFO: 21 source files to be analyzed
/usr/bin/run-scanner.sh: line 24: 11 Killed sonar-scanner “{ALL_ARGS[@]}" 2>&1 12 Done | tee "{SCANNER_REPORT}”
:heavy_multiplication_x: SonarCloud analysis failed.

Build C# project with bitbucket pipelines configured to reproduce. Error shows the session being killed causing it to fail.

Build Data.txt (4.8 KB)

Hello @technophobe,

A few questions:

  • Did your scans succeed in the past?
  • Is this error consistently reproducable?
  • If it is reproducable: does it always end on the exact same last log message?

It seems that the scan was killed from the “outside”, this could happen because the scan was using up too much memory.

It seems to stop while analyzing XML files, do you happen to have any big XML files in your repository?

You could try to configure a memory limit for the scanner, see the -Xmx parameter in this post: Bitbucket memory limit exceeded.