Hi,
We are using Jenkins and SonarQube Scanner together. Suddenly Code Analysis step starts to throw exception about JRE access violation. We are using JDK 11 version with exporting tools in Jenkinsfile which was documented in here;
https://docs.sonarqube.org/latest/analysis/analysis-with-java-11/
Here is the error detail;
Calling the SonarQube Scanner…
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffc325b4d99, pid=12444, tid=12892
JRE version: (11.0.2+9) (build )
Java VM: OpenJDK 64-Bit Server VM (11.0.2+9, mixed mode, aot, sharing, tiered, compressed oops, g1 gc, windows-amd64)
Problematic frame:
V [jvm.dll+0x1e4d99]
Core dump will be written. Default location: E:\Jenkins\workspace\V2_GIT_CreditiumGateway_master\hs_err_pid12444.mdmp
An error report file with more information is saved as:
E:\Jenkins\workspace\V2_GIT_CreditiumGateway_master\hs_err_pid12444.log
If you would like to submit a bug report, please visit:
http://bugreport.java.com/bugreport/crash.jsp
powershell.exe : OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
At E:\Jenkins\workspace\V2_GIT_CreditiumGateway_master@tmp\durable-d9f89027\powershellWrapper.ps1:3 char:1
- & powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Comm …
-
+ CategoryInfo : NotSpecified: (OpenJDK 64-Bit ... removed in 8.0:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError
The SonarQube Scanner did not complete successfully.
Here is the Jenkinsfile stage part
stage('Code Analysis') {
tools{
jdk 'jdk11'
}
agent { node { label "${env.SONAR_NODE}" } }
steps {
powershell '''
dotnet nuget update source "Nexus" -u $env:NEXUSUSER -p $env:NEXUSPASS --configfile nuget.config
if (Test-Path dotnet-sonarscanner.exe) {
Write-Host "dotnet-sonarscanner found"
}
else {
dotnet tool install dotnet-sonarscanner --tool-path . --version 4.8.0
}
'''
withSonarQubeEnv('InterSonar') {
powershell '''
.\\dotnet-sonarscanner.exe begin /k:DevCreditiumGateway /n:DevCreditiumGateway /v:${env:GIT_COMMIT} /d:sonar.host.url=${env:SONAR_URL} /d:sonar.login=${env:SONAR_TOKEN} /d:sonar.cs.opencover.reportsPaths=**/*Tests.xml /d:sonar.cs.xunit.reportsPaths=**/**/TestResults.xml /d:sonar.exclusions=samples/**/*
dotnet build -c Release /nodereuse:false /m:1 CreditiumGateway.sln
$testprojects= Get-ChildItem -Filter *Tests test/
foreach($i in $testprojects)
{
Write-Host $i
cd
dotnet test test/$i /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput="../test-coverage-results/$i.xml" --test-adapter-path:. --logger:"xunit" --no-build -v=normal -c Release --no-restore --no-build
}
.\\dotnet-sonarscanner.exe end /d:sonar.login=${env:SONAR_TOKEN}
'''
}
}
}
Sonarqube version:9.2.4
dotnet scanner version 4.8.0
JDK version 11.0.2
Thanks in advance.