Scan is intermittently failing w/ exit code 139

Using SonarQube LTS 9.9 Community Edition with the latest version of dotnet-sonarscanner 5.13.1, deployed via Docker.

My CI job that performs the sonar scan is intermittently failing. I added /d:sonar.verbose=true in my gitlab-ci.yml and it didn’t give me much to go on:

  script:
    - apk --no-cache add openjdk17 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
    - export PATH="$PATH:/root/.dotnet/tools"
    - dotnet tool install --global dotnet-sonarscanner --version 5.13.1 --configfile nuget.config.ci
    - dotnet restore -f
    - dotnet restore --configfile nuget.config.ci -f ./api/backend-for-frontend-api/backend-for-frontend-api.csproj
    - >
        dotnet sonarscanner begin /k:"components-bff"
        /d:sonar.verbose=true
        /d:sonar.login=$SONARQUBE_TOKEN
        /d:sonar.host.url=http://sonarqube.svc.cluster.local:9000/
        /n:"components-bff"
    - >
      dotnet build ./api/backend-for-frontend-api/backend-for-frontend-api.csproj
      -c Release --no-restore
    - dotnet sonarscanner end /d:sonar.login=$SONARQUBE_TOKEN

Here is the tail of the verbose logs:

"/builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/0/Issues.json"
574AB217-E8A5-4FBF-B1F9-A7DD9202716E.sonar.working.directory=/builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/.sonar/mod0
sonar.host.url=http://sonarqube.svc.cluster.local:9000/
sonar.visualstudio.enable=false
sonar.modules=574AB217-E8A5-4FBF-B1F9-A7DD9202716E
------------------------------------------------------------------------
21:43:35.961  Writing processing summary to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/ProjectInfo.log
Calling the SonarScanner CLI...
Executing file /root/.dotnet/tools/.store/dotnet-sonarscanner/5.13.1/dotnet-sonarscanner/5.13.1/tools/net5.0/any/sonar-scanner-4.8.1.3023/bin/sonar-scanner
  Args: -Dsonar.scanAllFiles=true -Dproject.settings=/builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/sonar-project.properties --from=ScannerMSBuild/5.13.1 --debug <sensitive data removed>
  Working directory: /builds/foo/outlook/foo-components-gen3-xl-bff
  Timeout (ms):-1
  Process id: 393
Process returned exit code 139
The SonarScanner did not complete successfully
21:43:35.991  Post-processing failed. Exit code: 1
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: command terminated with exit code 1

Looks like it is finishing the scan, calling a CLI and segfaulting? Any ideas?

I tried bumping the jdk version from 11 to 17 + grabbing the latest version of dotnet-sonarscanner to see if it helped (was originally using 5.8.0). Thanks!

Hey there.

Can you post your full gitlab-ci.yml file? I’d like to see, for example, what docker image your script is running in.

Looks like it is using image: mcr.microsoft.com/dotnet/sdk:5.0-alpine. Double checked and this csproj is also targeting .NET 5.0.

Here is the full gitlab-ci.yml file, for reference:

image: mcr.microsoft.com/dotnet/sdk:5.0-alpine
variables:
  VERSION: "23.9.0"
  BUILD: $CI_PIPELINE_IID
  DOCKER_IMAGE_PREFIX: "bar-docker-int.jfrog.io/foo/"
  DOCKER_IMAGE_NAME: "components-bff"
  DOCKER_IMAGE_NAME_FULL: $DOCKER_IMAGE_PREFIX$DOCKER_IMAGE_NAME
  DOTNET_VERSION: "5.0"
  NUGET_PACKAGES: /builds/$CI_PROJECT_PATH/packages
  PROP_URL: https://bar.jfrog.io/bar/api/storage/docker-int-local/foo/$DOCKER_IMAGE_NAME/
  PROP_PARAMS: "properties=version=$VERSION.$CI_PIPELINE_IID%7C\
    gitlab-build-properties.project-id=$CI_PROJECT_ID%7C\
    gitlab-build-properties.git-sha=$CI_COMMIT_SHORT_SHA%7C\
    gitlab-build-properties.git-branch=$CI_COMMIT_BRANCH"
stages:
  - build
  - test
  - package
  - publish
Build dotNet:
  stage: build
  script:
    - dotnet restore ./api/backend-for-frontend-api/backend-for-frontend-api.csproj --configfile nuget.config.ci -f
    - dotnet restore ./api/backend-for-frontend-api-tests/MyPipeline.UnitTests.csproj --configfile nuget.config.ci -f
    - >
      dotnet build ./api/backend-for-frontend-api/backend-for-frontend-api.csproj
      -c Release -p:Version=$VERSION.$BUILD --no-restore
  tags:
    - k8s
  artifacts:
    expire_in: 1 hour
    paths:
      - ./packages
      - "*/*/bin"
      - "*/*/obj"
  except:
    - master
# Run this in parallel with the compile
Sonar Scan Dotnet:
  timeout: 2h
  stage: build
  needs: []
  allow_failure: true
  script:
    - apk --no-cache add openjdk17 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
    - export PATH="$PATH:/root/.dotnet/tools"
    - dotnet tool install --global dotnet-sonarscanner --version 5.13.1 --configfile nuget.config.ci
    - dotnet restore --configfile nuget.config.ci -f ./api/backend-for-frontend-api/backend-for-frontend-api.csproj
    - >
        dotnet sonarscanner begin /k:"components-bff"
        /d:sonar.verbose=true
        /d:sonar.login=$SONARQUBE_TOKEN
        /d:sonar.host.url=http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/
        /n:"components-bff"
    - >
      dotnet build ./api/backend-for-frontend-api/backend-for-frontend-api.csproj
      -c Release --no-restore
    - dotnet sonarscanner end /d:sonar.login=$SONARQUBE_TOKEN
  tags:
    - k8s
  except:
    - tags
Test:
  stage: test
  script:
    - >
      dotnet build ./api/backend-for-frontend-api-tests/MyPipeline.UnitTests.csproj
      -c Release -p:Version=$VERSION.$BUILD --no-restore
    - >
      dotnet test ./api/backend-for-frontend-api-tests/MyPipeline.UnitTests.csproj
      -c Release -v normal --no-build
  tags:
    - k8s
  except:
    - master
Package:
  stage: package
  script:
    - dotnet publish ./api/backend-for-frontend-api/backend-for-frontend-api.csproj -c Release -o ./publish --no-build
  tags:
    - k8s
  artifacts:
    expire_in: 1 hour
    paths:
      - ./publish
  only:
    - /^release\/.*$/
    - /^hotfix\/.*$/
Publish Service:
  stage: publish
  script:
    - docker pull bar-docker.jfrog.io/aspnet-base
    - >
      docker build -f DockerFile.ci
      -t $DOCKER_IMAGE_NAME_FULL:$VERSION 
      -t $DOCKER_IMAGE_NAME_FULL:$VERSION.$BUILD 
      -t $DOCKER_IMAGE_NAME_FULL:latest .
    - docker push $DOCKER_IMAGE_NAME_FULL:$VERSION.$BUILD
    - docker push $DOCKER_IMAGE_NAME_FULL:$VERSION
    - docker push $DOCKER_IMAGE_NAME_FULL:latest
    - >
      curl --fail -H "X-JFrog-Art-Api:$JFROG_API_KEY" -X PUT
      $PROP_URL/$VERSION.$BUILD\?$PROP_PARAMS
    - >
      curl --fail -H "X-JFrog-Art-Api:$JFROG_API_KEY" -X PUT
      $PROP_URL/$VERSION\?$PROP_PARAMS
    - >
      curl --fail -H "X-JFrog-Art-Api:$JFROG_API_KEY" -X PUT
      $PROP_URL/latest\?$PROP_PARAMS
  tags:
    - linux
  only:
    - /^release\/.*$/
    - /^hotfix\/.*$/

Many thanks!

Hey there.

I think it’s worth thinking about simplifying your build a bit, especially since it’s all running in one docker container. Particuarly, it strikes me as odd that you choose to compile your application twice (at the same time), once with SonarQube analysis and once without:

I imagine this causes quite a battle for resources.

Can you run a test with just a single compilation that includes the dotnet sonarscanner begin and dotnet sonarscanner end steps?

1 Like

Colin,

Finally got around to testing this out. I flattened the redundant jobs down into a single one and ran a test that only performed a sonar begin > build > sonar end and it still seems to be segfaulting :sob:

Here is the full (anonymized) logs:


section_end:1694551467:get_sources
e[0Ksection_start:1694551467:step_script
e[0Ke[0Ke[36;1mExecuting "step_script" stage of the job scripte[0;me[0;m
e[32;1m$ apk --no-cache add openjdk17 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/communitye[0;m
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
(1/30) Installing java-common (0.5-r0)
(2/30) Installing libffi (3.4.2-r1)
(3/30) Installing p11-kit (0.24.0-r1)
(4/30) Installing libtasn1 (4.18.0-r1)
(5/30) Installing p11-kit-trust (0.24.0-r1)
(6/30) Installing java-cacerts (1.0-r1)
(7/30) Installing openjdk17-jre-headless (17.0.8_p7-r2)
(8/30) Installing libxau (1.0.9-r0)
(9/30) Installing libmd (1.0.3-r0)
(10/30) Installing libbsd (0.11.3-r1)
(11/30) Installing libxdmcp (1.1.3-r0)
(12/30) Installing libxcb (1.14-r2)
(13/30) Installing libx11 (1.7.3.1-r1)
(14/30) Installing libxext (1.3.4-r0)
(15/30) Installing libxi (1.8-r0)
(16/30) Installing libxrender (0.9.10-r3)
(17/30) Installing libxtst (1.2.3-r3)
(18/30) Installing alsa-lib (1.2.5.1-r1)
(19/30) Installing libbz2 (1.0.8-r1)
(20/30) Installing libpng (1.6.37-r1)
(21/30) Installing freetype (2.11.1-r2)
(22/30) Installing giflib (5.2.1-r0)
(23/30) Installing libjpeg-turbo (2.1.2-r0)
(24/30) Installing lcms2 (2.12-r1)
(25/30) Installing openjdk17-jre (17.0.8_p7-r2)
(26/30) Installing openjdk17-jmods (17.0.8_p7-r2)
(27/30) Installing openjdk17-jdk (17.0.8_p7-r2)
(28/30) Installing openjdk17-demos (17.0.8_p7-r2)
(29/30) Installing openjdk17-doc (17.0.8_p7-r2)
(30/30) Installing openjdk17 (17.0.8_p7-r2)
Executing busybox-1.34.1-r5.trigger
Executing ca-certificates-20211220-r0.trigger
Executing java-common-0.5-r0.trigger
OK: 331 MiB in 62 packages
e[32;1m$ export PATH="$PATH:/root/.dotnet/tools"e[0;m
e[32;1m$ dotnet tool install --global dotnet-sonarscanner --version 5.13.1 --configfile nuget.config.cie[0;m
You can invoke the tool using the following command: dotnet-sonarscanner
Tool 'dotnet-sonarscanner' (version '5.13.1') was successfully installed.
e[32;1m$ dotnet restore ./api/backend-for-frontend-api/backend-for-frontend-api.csproj --configfile nuget.config.ci -fe[0;m
  Determining projects to restore...
  Restored /builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/backend-for-frontend-api.csproj (in 4.27 sec).
e[32;1m$ dotnet restore ./api/backend-for-frontend-api-tests/MyPipeline.UnitTests.csproj --configfile nuget.config.ci -fe[0;m
  Determining projects to restore...
  Restored /builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/backend-for-frontend-api.csproj (in 541 ms).
  Restored /builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api-tests/MyPipeline.UnitTests.csproj (in 2.13 sec).
e[32;1m$ dotnet sonarscanner begin /k:"components-bff" /d:sonar.verbose=true /d:sonar.login=$SONARQUBE_TOKEN /d:sonar.host.url=http://removed-our-local-sonar-host:port/ /n:"components-bff"e[0;m
SonarScanner for MSBuild 5.13.1
Using the .NET Core version of the Scanner for MSBuild
Default properties file was found at /root/.dotnet/tools/.store/dotnet-sonarscanner/5.13.1/dotnet-sonarscanner/5.13.1/tools/net5.0/any/SonarQube.Analysis.xml
Loading analysis properties from /root/.dotnet/tools/.store/dotnet-sonarscanner/5.13.1/dotnet-sonarscanner/5.13.1/tools/net5.0/any/SonarQube.Analysis.xml
sonar.verbose=true was specified - setting the log verbosity to 'Debug'
Pre-processing started.
Preparing working directories...
Using environment variables to determine the download directory...
20:44:41.727  20:44:41.72  Loading analysis properties from /root/.dotnet/tools/.store/dotnet-sonarscanner/5.13.1/dotnet-sonarscanner/5.13.1/tools/net5.0/any/SonarQube.Analysis.xml
20:44:41.727  20:44:41.727  sonar.verbose=true was specified - setting the log verbosity to 'Debug'
20:44:41.729  Updating build integration targets...
20:44:41.733  Installed SonarQube.Integration.ImportBefore.targets to /root/.local/share/Microsoft/MSBuild/4.0/Microsoft.Common.targets/ImportBefore
20:44:41.733  Installed SonarQube.Integration.ImportBefore.targets to /root/.local/share/Microsoft/MSBuild/10.0/Microsoft.Common.targets/ImportBefore
20:44:41.733  Installed SonarQube.Integration.ImportBefore.targets to /root/.local/share/Microsoft/MSBuild/11.0/Microsoft.Common.targets/ImportBefore
20:44:41.734  Installed SonarQube.Integration.ImportBefore.targets to /root/.local/share/Microsoft/MSBuild/12.0/Microsoft.Common.targets/ImportBefore
20:44:41.734  Installed SonarQube.Integration.ImportBefore.targets to /root/.local/share/Microsoft/MSBuild/14.0/Microsoft.Common.targets/ImportBefore
20:44:41.734  Installed SonarQube.Integration.ImportBefore.targets to /root/.local/share/Microsoft/MSBuild/15.0/Microsoft.Common.targets/ImportBefore
20:44:41.734  Installed SonarQube.Integration.ImportBefore.targets to /root/.local/share/Microsoft/MSBuild/Current/Microsoft.Common.targets/ImportBefore
20:44:41.734  Installed SonarQube.Integration.ImportBefore.targets to /root/Microsoft/MSBuild/15.0/Microsoft.Common.targets/ImportBefore
20:44:41.735  Installed SonarQube.Integration.ImportBefore.targets to /root/Microsoft/MSBuild/Current/Microsoft.Common.targets/ImportBefore
20:44:41.735  Installed SonarQube.Integration.targets to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/bin/targets
20:44:41.736  Creating config and output folders...
20:44:41.737  Creating directory: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf
20:44:41.737  Creating directory: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out
20:44:41.767  Fetching server version...
20:44:41.769  Downloading from http://removed-our-local-sonar-host:port/api/server/version...
20:44:41.82  Response received from http://removed-our-local-sonar-host:port/api/server/version...
20:44:41.827  Checking validity of server license
20:44:41.827  Downloading from http://removed-our-local-sonar-host:port/api/editions/is_valid_license...
20:44:41.831  Response received from http://removed-our-local-sonar-host:port/api/editions/is_valid_license...
20:44:41.863  SonarQube Community Edition detected, license is valid.
20:44:41.868  Fetching analysis configuration settings...
20:44:41.87  Fetching properties for project 'components-bff'...
20:44:41.871  Downloading from http://removed-our-local-sonar-host:port/api/settings/values?component=components-bff...
20:44:41.883  Response received from http://removed-our-local-sonar-host:port/api/settings/values?component=components-bff...
20:44:41.896  Downloading from http://removed-our-local-sonar-host:port/api/languages/list...
20:44:41.898  Response received from http://removed-our-local-sonar-host:port/api/languages/list...
20:44:41.901  Fetching quality profile for project 'components-bff'...
20:44:41.901  Downloading from http://removed-our-local-sonar-host:port/api/qualityprofiles/search?project=components-bff...
20:44:41.94  Response received from http://removed-our-local-sonar-host:port/api/qualityprofiles/search?project=components-bff...
20:44:41.947  Fetching rules for quality profile 'AXlDJFJXS4-2LRLl6bEX'...
20:44:41.947  Downloading from http://removed-our-local-sonar-host:port/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AXlDJFJXS4-2LRLl6bEX&p=1...
20:44:42.086  Response received from http://removed-our-local-sonar-host:port/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AXlDJFJXS4-2LRLl6bEX&p=1...
20:44:42.108  Local analyzer cache: /tmp/.sonarqube/resources
20:44:42.113  Writing Roslyn generated ruleset to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/Sonar-cs.ruleset...
20:44:42.125  Writing Roslyn generated ruleset to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/Sonar-cs-none.ruleset...
20:44:42.128  Provisioning analyzer assemblies for cs...
20:44:42.129  Installing required Roslyn analyzers...
20:44:42.129  Processing plugin: csharp version 8.51.0.59060
20:44:42.196  Cache miss: plugin files were not found in the local cache
20:44:42.197  Fetching resource for plugin: csharp, version 8.51.0.59060. Resource: SonarAnalyzer-8.51.0.59060.zip
20:44:42.197  Downloading SonarAnalyzer-8.51.0.59060.zip to /tmp/.sonarqube/resources/0
20:44:42.199  Downloading file to /tmp/.sonarqube/resources/0/SonarAnalyzer-8.51.0.59060.zip...
20:44:42.199  Downloading from http://removed-our-local-sonar-host:port/static/csharp/SonarAnalyzer-8.51.0.59060.zip...
20:44:42.208  Response received from http://removed-our-local-sonar-host:port/static/csharp/SonarAnalyzer-8.51.0.59060.zip...
20:44:42.21  Extracting files to /tmp/.sonarqube/resources/0...
20:44:42.248  Processing plugin: vbnet version 8.51.0.59060
20:44:42.265  Cache miss: plugin files were not found in the local cache
20:44:42.265  Fetching resource for plugin: vbnet, version 8.51.0.59060. Resource: SonarAnalyzer-8.51.0.59060.zip
20:44:42.266  Downloading SonarAnalyzer-8.51.0.59060.zip to /tmp/.sonarqube/resources/1
20:44:42.266  Downloading file to /tmp/.sonarqube/resources/1/SonarAnalyzer-8.51.0.59060.zip...
20:44:42.266  Downloading from http://removed-our-local-sonar-host:port/static/vbnet/SonarAnalyzer-8.51.0.59060.zip...
20:44:42.27  Response received from http://removed-our-local-sonar-host:port/static/vbnet/SonarAnalyzer-8.51.0.59060.zip...
20:44:42.271  Extracting files to /tmp/.sonarqube/resources/1...
20:44:42.286  Writing Roslyn analyzer additional file to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/cs/SonarLint.xml...
20:44:42.286  Fetching quality profile for project 'components-bff'...
20:44:42.286  Downloading from http://removed-our-local-sonar-host:port/api/qualityprofiles/search?project=components-bff...
20:44:42.328  Response received from http://removed-our-local-sonar-host:port/api/qualityprofiles/search?project=components-bff...
20:44:42.329  Fetching rules for quality profile 'AXlDJFbAS4-2LRLl6br6'...
20:44:42.329  Downloading from http://removed-our-local-sonar-host:port/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AXlDJFbAS4-2LRLl6br6&p=1...
20:44:42.401  Response received from http://removed-our-local-sonar-host:port/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AXlDJFbAS4-2LRLl6br6&p=1...
20:44:42.405  Local analyzer cache: /tmp/.sonarqube/resources
20:44:42.405  Writing Roslyn generated ruleset to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/Sonar-vbnet.ruleset...
20:44:42.406  Writing Roslyn generated ruleset to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/Sonar-vbnet-none.ruleset...
20:44:42.406  Provisioning analyzer assemblies for vbnet...
20:44:42.406  Installing required Roslyn analyzers...
20:44:42.406  Processing plugin: csharp version 8.51.0.59060
20:44:42.407  Cache hit: using plugin files from /tmp/.sonarqube/resources/0
20:44:42.407  Processing plugin: vbnet version 8.51.0.59060
20:44:42.407  Cache hit: using plugin files from /tmp/.sonarqube/resources/1
20:44:42.408  Writing Roslyn analyzer additional file to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/vbnet/SonarLint.xml...
20:44:42.413  Processing analysis cache
20:44:42.416  Incremental PR analysis: Base branch parameter was not provided.
20:44:42.416  Cache data is empty. A full analysis will be performed.
20:44:42.454  Pre-processing succeeded.
e[32;1m$ dotnet build ./api/backend-for-frontend-api/backend-for-frontend-api.csproj -c Release -p:Version=$VERSION.$BUILD --no-restore > sonarscan.loge[0;m
e[32;1m$ dotnet sonarscanner end /d:sonar.login=$SONARQUBE_TOKENe[0;m
SonarScanner for MSBuild 5.13.1
Using the .NET Core version of the Scanner for MSBuild
Post-processing started.
20:45:41.304  20:45:41.3  Uninstalling target: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/bin/targets/SonarQube.Integration.targets
20:45:41.304  20:45:41.304  sonar.verbose=true was specified - setting the log verbosity to 'Debug'
20:45:41.304  Loading the SonarQube analysis config from /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/SonarQubeAnalysisConfig.xml
20:45:41.304  Not running under TeamBuild
20:45:41.305  Analysis base directory: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube
Build directory: 
Bin directory: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/bin
Config directory: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf
Output directory: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out
Config file: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/SonarQubeAnalysisConfig.xml
20:45:41.307  Generating SonarQube project properties file to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/sonar-project.properties
20:45:41.348  Setting analysis property: sonar.visualstudio.enable=false
20:45:41.399  The supplied Code Analysis ErrorLog file is a valid json file and does not need to be fixed: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/0/Issues.json
20:45:41.419  Using longest common projects path as a base directory: '/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api'.
20:45:41.438  Dumping content of sonar-project.properties
------------------------------------------------------------------------
sonar.projectKey=components-bff
sonar.projectName=components-bff
sonar.working.directory=/builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/.sonar
sonar.projectBaseDir=/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api
sonar.pullrequest.cache.basepath=/builds/foo/outlook/foo-components-gen3-xl-bff

F24234C2-C62E-4D0D-A1DE-93E172A494E9.sonar.projectKey=components-bff:F24234C2-C62E-4D0D-A1DE-93E172A494E9
F24234C2-C62E-4D0D-A1DE-93E172A494E9.sonar.projectName=backend-for-frontend-api
F24234C2-C62E-4D0D-A1DE-93E172A494E9.sonar.projectBaseDir=/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api
F24234C2-C62E-4D0D-A1DE-93E172A494E9.sonar.sourceEncoding=utf-8
F24234C2-C62E-4D0D-A1DE-93E172A494E9.sonar.sources=\
there were like 400 CS files listed here that I replaced with this comment, plus these:
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/obj/Release/net5.0/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/obj/Release/net5.0/backend-for-frontend-api.AssemblyInfo.cs",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/obj/Release/net5.0/foo.MyPipelineApi.MvcApplicationPartsAssemblyInfo.cs",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/nuget.config",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/web.config",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/appsettings.Development.json",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/appsettings.json",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/backend-for-frontend-api.v3.ncrunchsolution",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/Scaffold.ps1",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/_NCrunch_backend-for-frontend-api/backend-for-frontend-api.crunchsolution.cache",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/_NCrunch_backend-for-frontend-api/backend-for-frontend-api.executiontimes.cache",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/Properties/launchSettings.json",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/Properties/PublishProfiles/FolderProfile.pubxml",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/obj/Release/net5.0/apphost"

F24234C2-C62E-4D0D-A1DE-93E172A494E9.sonar.cs.analyzer.projectOutPaths=\
"/builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/0"
F24234C2-C62E-4D0D-A1DE-93E172A494E9.sonar.cs.roslyn.reportFilePaths=\
"/builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/0/Issues.json"

F24234C2-C62E-4D0D-A1DE-93E172A494E9.sonar.working.directory=/builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/.sonar/mod0
sonar.host.url=http://removed-our-local-sonar-host:port/
sonar.visualstudio.enable=false

sonar.modules=F24234C2-C62E-4D0D-A1DE-93E172A494E9


------------------------------------------------------------------------
20:45:41.448  Writing processing summary to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/ProjectInfo.log
Calling the SonarScanner CLI...
Executing file /root/.dotnet/tools/.store/dotnet-sonarscanner/5.13.1/dotnet-sonarscanner/5.13.1/tools/net5.0/any/sonar-scanner-4.8.1.3023/bin/sonar-scanner
  Args: -Dsonar.scanAllFiles=true -Dproject.settings=/builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/sonar-project.properties --from=ScannerMSBuild/5.13.1 --debug <sensitive data removed>
  Working directory: /builds/foo/outlook/foo-components-gen3-xl-bff
  Timeout (ms):-1
  Process id: 425
Process returned exit code 139
The SonarScanner did not complete successfully
20:45:41.478  Post-processing failed. Exit code: 1

section_end:1694551541:step_script
e[0Ksection_start:1694551541:cleanup_file_variables
e[0Ke[0Ke[36;1mCleaning up project directory and file based variablese[0;me[0;m

section_end:1694551542:cleanup_file_variables
e[0Ke[31;1mERROR: Job failed: command terminated with exit code 1
e[0;m

I did notice some of our larger repos were spitting out so many warnings that it was causing a similar issue. This specific repo only has like 18 warnings though.

Any other ideas on how I could troubleshoot this?

Hey there.

I just noticed the sonarscan.loge file you’re outputting the logs to.

I’m starting to think we might only be getting stdout here instead of stderr which could have more details.

What do you see if you stop piping to a log file and just see get the logs from the console (or make sure you pipe all logs to one file, both stdout and stderr https://linuxize.com/post/bash-redirect-stderr-stdout/)

1 Like

Sorry, that > sonarscan.log was included by accident. I threw that in there as a test pipeline run before writing that post and copy/pasted it on accident.

The logs without it look almost the exact same:

Getting source from Git repository
00:01
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/foo/outlook/foo-components-gen3-xl-bff/.git/
Created fresh repository.
Checking out 1d6ed373 as ticket/CRM-18449...
Skipping Git submodules setup
Executing "step_script" stage of the job script
01:14
$ apk --no-cache add openjdk17 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
(1/30) Installing java-common (0.5-r0)
(2/30) Installing libffi (3.4.2-r1)
(3/30) Installing p11-kit (0.24.0-r1)
(4/30) Installing libtasn1 (4.18.0-r1)
(5/30) Installing p11-kit-trust (0.24.0-r1)
(6/30) Installing java-cacerts (1.0-r1)
(7/30) Installing openjdk17-jre-headless (17.0.8_p7-r2)
(8/30) Installing libxau (1.0.9-r0)
(9/30) Installing libmd (1.0.3-r0)
(10/30) Installing libbsd (0.11.3-r1)
(11/30) Installing libxdmcp (1.1.3-r0)
(12/30) Installing libxcb (1.14-r2)
(13/30) Installing libx11 (1.7.3.1-r1)
(14/30) Installing libxext (1.3.4-r0)
(15/30) Installing libxi (1.8-r0)
(16/30) Installing libxrender (0.9.10-r3)
(17/30) Installing libxtst (1.2.3-r3)
(18/30) Installing alsa-lib (1.2.5.1-r1)
(19/30) Installing libbz2 (1.0.8-r1)
(20/30) Installing libpng (1.6.37-r1)
(21/30) Installing freetype (2.11.1-r2)
(22/30) Installing giflib (5.2.1-r0)
(23/30) Installing libjpeg-turbo (2.1.2-r0)
(24/30) Installing lcms2 (2.12-r1)
(25/30) Installing openjdk17-jre (17.0.8_p7-r2)
(26/30) Installing openjdk17-jmods (17.0.8_p7-r2)
(27/30) Installing openjdk17-jdk (17.0.8_p7-r2)
(28/30) Installing openjdk17-demos (17.0.8_p7-r2)
(29/30) Installing openjdk17-doc (17.0.8_p7-r2)
(30/30) Installing openjdk17 (17.0.8_p7-r2)
Executing busybox-1.34.1-r5.trigger
Executing ca-certificates-20211220-r0.trigger
Executing java-common-0.5-r0.trigger
OK: 331 MiB in 62 packages
$ export PATH="$PATH:/root/.dotnet/tools"
$ dotnet tool install --global dotnet-sonarscanner --version 5.13.1 --configfile nuget.config.ci
You can invoke the tool using the following command: dotnet-sonarscanner
Tool 'dotnet-sonarscanner' (version '5.13.1') was successfully installed.
$ dotnet restore ./api/backend-for-frontend-api/backend-for-frontend-api.csproj --configfile nuget.config.ci -f
  Determining projects to restore...
  Restored /builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/backend-for-frontend-api.csproj (in 4.38 sec).
$ dotnet restore ./api/backend-for-frontend-api-tests/MyPipeline.UnitTests.csproj --configfile nuget.config.ci -f
  Determining projects to restore...
  Restored /builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/backend-for-frontend-api.csproj (in 559 ms).
  Restored /builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api-tests/MyPipeline.UnitTests.csproj (in 1.92 sec).
$ dotnet sonarscanner begin /k:"components-bff" /d:sonar.verbose=true /d:sonar.login=$SONARQUBE_TOKEN /d:sonar.host.url=http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/ /n:"components-bff"
SonarScanner for MSBuild 5.13.1
Using the .NET Core version of the Scanner for MSBuild
Default properties file was found at /root/.dotnet/tools/.store/dotnet-sonarscanner/5.13.1/dotnet-sonarscanner/5.13.1/tools/net5.0/any/SonarQube.Analysis.xml
Loading analysis properties from /root/.dotnet/tools/.store/dotnet-sonarscanner/5.13.1/dotnet-sonarscanner/5.13.1/tools/net5.0/any/SonarQube.Analysis.xml
sonar.verbose=true was specified - setting the log verbosity to 'Debug'
Pre-processing started.
Preparing working directories...
Using environment variables to determine the download directory...
20:38:11.781  20:38:11.773  Loading analysis properties from /root/.dotnet/tools/.store/dotnet-sonarscanner/5.13.1/dotnet-sonarscanner/5.13.1/tools/net5.0/any/SonarQube.Analysis.xml
20:38:11.781  20:38:11.781  sonar.verbose=true was specified - setting the log verbosity to 'Debug'
20:38:11.783  Updating build integration targets...
20:38:11.787  Installed SonarQube.Integration.ImportBefore.targets to /root/.local/share/Microsoft/MSBuild/4.0/Microsoft.Common.targets/ImportBefore
20:38:11.787  Installed SonarQube.Integration.ImportBefore.targets to /root/.local/share/Microsoft/MSBuild/10.0/Microsoft.Common.targets/ImportBefore
20:38:11.787  Installed SonarQube.Integration.ImportBefore.targets to /root/.local/share/Microsoft/MSBuild/11.0/Microsoft.Common.targets/ImportBefore
20:38:11.787  Installed SonarQube.Integration.ImportBefore.targets to /root/.local/share/Microsoft/MSBuild/12.0/Microsoft.Common.targets/ImportBefore
20:38:11.787  Installed SonarQube.Integration.ImportBefore.targets to /root/.local/share/Microsoft/MSBuild/14.0/Microsoft.Common.targets/ImportBefore
20:38:11.787  Installed SonarQube.Integration.ImportBefore.targets to /root/.local/share/Microsoft/MSBuild/15.0/Microsoft.Common.targets/ImportBefore
20:38:11.788  Installed SonarQube.Integration.ImportBefore.targets to /root/.local/share/Microsoft/MSBuild/Current/Microsoft.Common.targets/ImportBefore
20:38:11.788  Installed SonarQube.Integration.ImportBefore.targets to /root/Microsoft/MSBuild/15.0/Microsoft.Common.targets/ImportBefore
20:38:11.788  Installed SonarQube.Integration.ImportBefore.targets to /root/Microsoft/MSBuild/Current/Microsoft.Common.targets/ImportBefore
20:38:11.789  Installed SonarQube.Integration.targets to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/bin/targets
20:38:11.789  Creating config and output folders...
20:38:11.79  Creating directory: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf
20:38:11.79  Creating directory: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out
20:38:11.833  Fetching server version...
20:38:11.836  Downloading from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/server/version...
20:38:11.902  Response received from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/server/version...
20:38:11.909  Checking validity of server license
20:38:11.909  Downloading from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/editions/is_valid_license...
20:38:11.914  Response received from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/editions/is_valid_license...
20:38:11.941  SonarQube Community Edition detected, license is valid.
20:38:11.947  Fetching analysis configuration settings...
20:38:11.949  Fetching properties for project 'components-bff'...
20:38:11.95  Downloading from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/settings/values?component=components-bff...
20:38:11.962  Response received from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/settings/values?component=components-bff...
20:38:11.974  Downloading from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/languages/list...
20:38:11.976  Response received from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/languages/list...
20:38:11.978  Fetching quality profile for project 'components-bff'...
20:38:11.978  Downloading from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/qualityprofiles/search?project=components-bff...
20:38:12.016  Response received from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/qualityprofiles/search?project=components-bff...
20:38:12.023  Fetching rules for quality profile 'AXlDJFJXS4-2LRLl6bEX'...
20:38:12.023  Downloading from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AXlDJFJXS4-2LRLl6bEX&p=1...
20:38:12.232  Response received from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AXlDJFJXS4-2LRLl6bEX&p=1...
20:38:12.256  Local analyzer cache: /tmp/.sonarqube/resources
20:38:12.261  Writing Roslyn generated ruleset to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/Sonar-cs.ruleset...
20:38:12.275  Writing Roslyn generated ruleset to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/Sonar-cs-none.ruleset...
20:38:12.278  Provisioning analyzer assemblies for cs...
20:38:12.279  Installing required Roslyn analyzers...
20:38:12.279  Processing plugin: csharp version 8.51.0.59060
20:38:12.348  Cache miss: plugin files were not found in the local cache
20:38:12.348  Fetching resource for plugin: csharp, version 8.51.0.59060. Resource: SonarAnalyzer-8.51.0.59060.zip
20:38:12.349  Downloading SonarAnalyzer-8.51.0.59060.zip to /tmp/.sonarqube/resources/0
20:38:12.35  Downloading file to /tmp/.sonarqube/resources/0/SonarAnalyzer-8.51.0.59060.zip...
20:38:12.35  Downloading from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/static/csharp/SonarAnalyzer-8.51.0.59060.zip...
20:38:12.359  Response received from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/static/csharp/SonarAnalyzer-8.51.0.59060.zip...
20:38:12.361  Extracting files to /tmp/.sonarqube/resources/0...
20:38:12.39  Processing plugin: vbnet version 8.51.0.59060
20:38:12.405  Cache miss: plugin files were not found in the local cache
20:38:12.405  Fetching resource for plugin: vbnet, version 8.51.0.59060. Resource: SonarAnalyzer-8.51.0.59060.zip
20:38:12.405  Downloading SonarAnalyzer-8.51.0.59060.zip to /tmp/.sonarqube/resources/1
20:38:12.405  Downloading file to /tmp/.sonarqube/resources/1/SonarAnalyzer-8.51.0.59060.zip...
20:38:12.405  Downloading from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/static/vbnet/SonarAnalyzer-8.51.0.59060.zip...
20:38:12.409  Response received from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/static/vbnet/SonarAnalyzer-8.51.0.59060.zip...
20:38:12.41  Extracting files to /tmp/.sonarqube/resources/1...
20:38:12.429  Writing Roslyn analyzer additional file to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/cs/SonarLint.xml...
20:38:12.429  Fetching quality profile for project 'components-bff'...
20:38:12.429  Downloading from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/qualityprofiles/search?project=components-bff...
20:38:12.567  Response received from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/qualityprofiles/search?project=components-bff...
20:38:12.568  Fetching rules for quality profile 'AXlDJFbAS4-2LRLl6br6'...
20:38:12.568  Downloading from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AXlDJFbAS4-2LRLl6br6&p=1...
20:38:12.692  Response received from http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AXlDJFbAS4-2LRLl6br6&p=1...
20:38:12.694  Local analyzer cache: /tmp/.sonarqube/resources
20:38:12.695  Writing Roslyn generated ruleset to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/Sonar-vbnet.ruleset...
20:38:12.695  Writing Roslyn generated ruleset to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/Sonar-vbnet-none.ruleset...
20:38:12.696  Provisioning analyzer assemblies for vbnet...
20:38:12.696  Installing required Roslyn analyzers...
20:38:12.696  Processing plugin: csharp version 8.51.0.59060
20:38:12.696  Cache hit: using plugin files from /tmp/.sonarqube/resources/0
20:38:12.696  Processing plugin: vbnet version 8.51.0.59060
20:38:12.697  Cache hit: using plugin files from /tmp/.sonarqube/resources/1
20:38:12.697  Writing Roslyn analyzer additional file to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/vbnet/SonarLint.xml...
20:38:12.7  Processing analysis cache
20:38:12.702  Incremental PR analysis: Base branch parameter was not provided.
20:38:12.702  Cache data is empty. A full analysis will be performed.
20:38:12.737  Pre-processing succeeded.
$ dotnet build ./api/backend-for-frontend-api/backend-for-frontend-api.csproj -c Release -p:Version=$VERSION.$BUILD --no-restore
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET

a bunch of warnings were here, there are actually over 300 of them!

Copyright (C) Microsoft Corporation. All rights reserved.
    306 Warning(s)
    0 Error(s)
Time Elapsed 00:00:57.99
$ dotnet sonarscanner end /d:sonar.login=$SONARQUBE_TOKEN
SonarScanner for MSBuild 5.13.1
Using the .NET Core version of the Scanner for MSBuild
Post-processing started.
20:39:11.401  20:39:11.398  Uninstalling target: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/bin/targets/SonarQube.Integration.targets
20:39:11.401  20:39:11.401  sonar.verbose=true was specified - setting the log verbosity to 'Debug'
20:39:11.402  Loading the SonarQube analysis config from /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/SonarQubeAnalysisConfig.xml
20:39:11.402  Not running under TeamBuild
20:39:11.402  Analysis base directory: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube
Build directory: 
Bin directory: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/bin
Config directory: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf
Output directory: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out
Config file: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/conf/SonarQubeAnalysisConfig.xml
20:39:11.404  Generating SonarQube project properties file to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/sonar-project.properties
20:39:11.448  Setting analysis property: sonar.visualstudio.enable=false
20:39:11.506  The supplied Code Analysis ErrorLog file is a valid json file and does not need to be fixed: /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/0/Issues.json
20:39:11.527  Using longest common projects path as a base directory: '/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api'.
20:39:11.547  Dumping content of sonar-project.properties
------------------------------------------------------------------------
sonar.projectKey=components-bff
sonar.projectName=components-bff
sonar.working.directory=/builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/.sonar
sonar.projectBaseDir=/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api
sonar.pullrequest.cache.basepath=/builds/foo/outlook/foo-components-gen3-xl-bff
E351912D-0953-4564-A010-F7E21DA79E06.sonar.projectKey=components-bff:E351912D-0953-4564-A010-F7E21DA79E06
E351912D-0953-4564-A010-F7E21DA79E06.sonar.projectName=backend-for-frontend-api
E351912D-0953-4564-A010-F7E21DA79E06.sonar.projectBaseDir=/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api
E351912D-0953-4564-A010-F7E21DA79E06.sonar.sourceEncoding=utf-8
E351912D-0953-4564-A010-F7E21DA79E06.sonar.sources=\
there are like 400 *.cs files here that I omitted for brevity, plus these:
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/nuget.config",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/web.config",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/appsettings.Development.json",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/appsettings.json",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/backend-for-frontend-api.v3.ncrunchsolution",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/Scaffold.ps1",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/_NCrunch_backend-for-frontend-api/backend-for-frontend-api.crunchsolution.cache",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/_NCrunch_backend-for-frontend-api/backend-for-frontend-api.executiontimes.cache",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/Properties/launchSettings.json",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/Properties/PublishProfiles/FolderProfile.pubxml",\
"/builds/foo/outlook/foo-components-gen3-xl-bff/api/backend-for-frontend-api/obj/Release/net5.0/apphost"
E351912D-0953-4564-A010-F7E21DA79E06.sonar.cs.analyzer.projectOutPaths=\
"/builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/0"
E351912D-0953-4564-A010-F7E21DA79E06.sonar.cs.roslyn.reportFilePaths=\
"/builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/0/Issues.json"
E351912D-0953-4564-A010-F7E21DA79E06.sonar.working.directory=/builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/.sonar/mod0
sonar.host.url=http://sonarqube-sonarqube.sonarqube.svc.cluster.local:9000/
sonar.visualstudio.enable=false
sonar.modules=E351912D-0953-4564-A010-F7E21DA79E06
------------------------------------------------------------------------
20:39:11.551  Writing processing summary to /builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/ProjectInfo.log
Calling the SonarScanner CLI...
Executing file /root/.dotnet/tools/.store/dotnet-sonarscanner/5.13.1/dotnet-sonarscanner/5.13.1/tools/net5.0/any/sonar-scanner-4.8.1.3023/bin/sonar-scanner
  Args: -Dsonar.scanAllFiles=true -Dproject.settings=/builds/foo/outlook/foo-components-gen3-xl-bff/.sonarqube/out/sonar-project.properties --from=ScannerMSBuild/5.13.1 --debug <sensitive data removed>
  Working directory: /builds/foo/outlook/foo-components-gen3-xl-bff
  Timeout (ms):-1
  Process id: 411
Process returned exit code 139
The SonarScanner did not complete successfully
20:39:11.581  Post-processing failed. Exit code: 1
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: command terminated with exit code 1

What is odd is some of the other C# pipelines are working as expected with almost the same exact setup. I did a diff earlier today and only thing that I noticed was the .NET version: the working project is version 7 while this one is 5 (I plan on updating this repo when .NET 8 comes out in November). Still not sure why this one is randomly segfaulting.

Many thanks!

Thanks.

I noticed this just now:

Alpine Linux 3.15 is supported (for 2 more months)… I’m curious if you still reproduce the segfault on a newer version, like v3.18?

1 Like

Good catch! I switched out the edge repo and the pipeline has worked fine 3x in a row. Hopefully it continues as such.

Very grateful for your help

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