Pipe: sonarsource/sonarcloud-scan:1.0.1 stuck on a file while scanning rules

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension):
    – bitbutcket Cloud
    – sonarsource/sonarcloud-scan:1.0.1
    – Lang: python
  • error observed (wrap logs/code around triple quote ``` for proper formatting)
INFO: 12 source files to be analyzed
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
  • steps to reproduce: run pipeline
  • potential workaround: unknown

Full logs:

----------------------------------------------------------------------
Ran 22 tests in 9.061s

OK

+ coverage report --omit "test/*.py"
Name                                          Stmts   Miss  Cover
-----------------------------------------------------------------
src/mri_service/__init__.py                       0      0   100%
src/mri_service/communication/__init__.py         0      0   100%
src/mri_service/communication/event_keys.py      21      0   100%
src/mri_service/config.py                         9      0   100%
src/mri_service/logic.py                         81      9    89%
src/mri_service/smri/__init__.py                  0      0   100%
src/mri_service/smri/engine.py                    8      3    62%
src/mri_service/smri/hardware.py                  9      4    56%
src/mri_service/threads/__init__.py               0      0   100%
src/mri_service/threads/listeners.py             13      0   100%
-----------------------------------------------------------------
TOTAL                                           141     16    89%

+ coverage xml -i

+ docker container run \
   --volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \
   --volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \
   --volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \
   --volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \
   --volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan \
   --workdir=$(pwd) \
   --label=org.bitbucket.pipelines.system=true \
   --env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \
   --env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \
   --env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \
   --env=BITBUCKET_PROJECT_UUID="$BITBUCKET_PROJECT_UUID" \
   --env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \
   --env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \
   --env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \
   --env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \
   --env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \
   --env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \
   --env=BITBUCKET_PARALLEL_STEP_COUNT="$BITBUCKET_PARALLEL_STEP_COUNT" \
   --env=BITBUCKET_REPO_SLUG="$BITBUCKET_REPO_SLUG" \
   --env=CI="$CI" \
   --env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \
   --env=BITBUCKET_PARALLEL_STEP="$BITBUCKET_PARALLEL_STEP" \
   --env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \
   --env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \
   --env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \
   --env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \
   --env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \
   --env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \
   --env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \
   --env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \
   --env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \
   --env=DOCKER_HOST="tcp://host.docker.internal:2375" \
   --env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \
   --env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan" \
   --env=EXTRA_ARGS="-Dsonar.sources=src -Dsonar.python.coverage.reportPaths=coverage.xml" \
   --env=SONAR_TOKEN="${SONAR_TOKEN}" \
   --add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
   sonarsource/sonarcloud-scan:1.0.1
Unable to find image 'sonarsource/sonarcloud-scan:1.0.1' locally
1.0.1: Pulling from sonarsource/sonarcloud-scan
27833a3ba0a5: Pulling fs layer
16d944e3d00d: Pulling fs layer
6aaf465b8930: Pulling fs layer
0684138f4cb6: Pulling fs layer
67c4e741e688: Pulling fs layer
783178df3a0c: Pulling fs layer
d0dc10fff37d: Pulling fs layer
8ecc489c7d12: Pulling fs layer
fa53c38fc94e: Pulling fs layer
7e9295ed80e6: Pulling fs layer
3c6fac14ec37: Pulling fs layer
783178df3a0c: Waiting
fa53c38fc94e: Waiting
7e9295ed80e6: Waiting
3c6fac14ec37: Waiting
0684138f4cb6: Waiting
67c4e741e688: Waiting
d0dc10fff37d: Waiting
8ecc489c7d12: Waiting
6aaf465b8930: Verifying Checksum
6aaf465b8930: Download complete
16d944e3d00d: Verifying Checksum
16d944e3d00d: Download complete
67c4e741e688: Verifying Checksum
67c4e741e688: Download complete
0684138f4cb6: Download complete
27833a3ba0a5: Verifying Checksum
27833a3ba0a5: Download complete
d0dc10fff37d: Verifying Checksum
d0dc10fff37d: Download complete
8ecc489c7d12: Verifying Checksum
8ecc489c7d12: Download complete
7e9295ed80e6: Verifying Checksum
7e9295ed80e6: Download complete
783178df3a0c: Verifying Checksum
783178df3a0c: Download complete
3c6fac14ec37: Verifying Checksum
3c6fac14ec37: Download complete
fa53c38fc94e: Verifying Checksum
fa53c38fc94e: Download complete
27833a3ba0a5: Pull complete
16d944e3d00d: Pull complete
6aaf465b8930: Pull complete
0684138f4cb6: Pull complete
67c4e741e688: Pull complete
783178df3a0c: Pull complete
d0dc10fff37d: Pull complete
8ecc489c7d12: Pull complete
fa53c38fc94e: Pull complete
7e9295ed80e6: Pull complete
3c6fac14ec37: Pull complete
Digest: sha256:87b55bfefaa752e467abf4f5dd34a00e2ac95e14b6aa79924df5ed17e97e2cdb
Status: Downloaded newer image for sonarsource/sonarcloud-scan:1.0.1
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 11.0.2 Oracle Corporation (64-bit)
INFO: Linux 4.19.128-flatcar amd64
INFO: Bitbucket Cloud Pipelines detected
INFO: User cache: /root/.sonar/cache
INFO: SonarQube server 8.0.0
INFO: Default locale: "en", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=587ms
INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
INFO: User cache: /root/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=129ms
INFO: Load/download plugins (done) | time=30646ms
INFO: Loaded core extensions: developer-scanner
INFO: Detected project key 'orbem_scaffold' from 'Bitbucket Cloud Pipelines'
INFO: Detected organization key 'orbem' from 'Bitbucket Cloud Pipelines'
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=2ms
INFO: Project key: orbem_scaffold
INFO: Base dir: /opt/atlassian/pipelines/agent/build/mri-service
INFO: Working dir: /opt/atlassian/pipelines/agent/build/mri-service/.scannerwork
INFO: Load project settings for component key: 'orbem_scaffold'
INFO: Load project settings for component key: 'orbem_scaffold' (done) | time=217ms
INFO: Found an active CI vendor: 'Bitbucket Pipelines'
INFO: Load project branches
INFO: Load project branches (done) | time=126ms
INFO: Check ALM binding of project 'orbem_scaffold'
INFO: Detected project binding: BOUND
INFO: Check ALM binding of project 'orbem_scaffold' (done) | time=96ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=100ms
INFO: Load branch configuration
INFO: Detected analysis for branch 'feature/GDEV-138-source-code-evaluation-added-to'
INFO: Auto-configuring branch feature/GDEV-138-source-code-evaluation-added-to
INFO: Load branch configuration (done) | time=3ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=178ms
INFO: Load active rules
INFO: Load active rules (done) | time=3535ms
INFO: Organization key: orbem
INFO: Branch name: feature/GDEV-138-source-code-evaluation-added-to, type: short living
INFO: SCM collecting changed files in the branch
INFO: SCM collecting changed files in the branch (done) | time=272ms
INFO: Indexing files...
INFO: Project configuration:
INFO: 12 files indexed
INFO: 10 files ignored because of scm ignore settings
INFO: Quality profile for py: Sonar way
INFO: ------------- Run sensors on module orbem_scaffold
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=110ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/root/.sonar/cache/a89f1943fc75b65becd9fb4ecab8d913/sonar-tsql-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
INFO: Sensor SonarCSS Rules [cssfamily]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=3ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=9ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=10ms
INFO: Sensor Python Sensor [python]
INFO: Starting global symbols computation
INFO: 12 source files to be analyzed
WARN: locking FileBasedConfig[/root/.config/jgit/config] failed after 5 retries
INFO: 11/12 files analyzed, current file: src/mri_service/main.py
INFO: 12/12 source files have been analyzed
INFO: Starting rules execution
INFO: 12 source files to be analyzed
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py
INFO: 0/12 files analyzed, current file: src/mri_service/config.py

As I found here: Analyze an angular project on Bitbucket pipeline using sonar-cloud-scan pipe failed. It was a matter of increasing the memory allocated to the pipes.