From 83610a72d70cfe55e62e98c1f13e786b88d70220 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Fri, 20 Dec 2024 12:01:55 +0100 Subject: [PATCH] Upload dumps from Linux and macOS runs if dotnet process crashes during build or test --- azure-pipelines-PR.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index 75d0484cac9..df48a4c30e0 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -555,6 +555,10 @@ stages: - checkout: self clean: true - script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr + env: + DOTNET_DbgEnableMiniDump: 1 + DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing. + DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)\$(Build.BuildId)-%e-%p-%t.dmp displayName: Build / Test - task: PublishTestResults@2 displayName: Publish Test Results @@ -574,6 +578,15 @@ stages: publishLocation: Container continueOnError: true condition: failed() + - task: PublishBuildArtifacts@1 + displayName: Publish Dumps + condition: failed() + continueOnError: true + inputs: + PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)' + ArtifactName: 'Linux $(_BuildConfig) process dumps' + ArtifactType: Container + parallel: true - script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj displayName: Dump NuGet cache contents condition: failed() @@ -600,7 +613,19 @@ stages: - script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr env: COMPlus_DefaultStackSize: 1000000 + DOTNET_DbgEnableMiniDump: 1 + DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing. + DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)\$(Build.BuildId)-%e-%p-%t.dmp displayName: Build / Test + - task: PublishBuildArtifacts@1 + displayName: Publish Dumps + condition: failed() + continueOnError: true + inputs: + PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)' + ArtifactName: 'macOS $(_BuildConfig) process dumps' + ArtifactType: Container + parallel: true - task: PublishTestResults@2 displayName: Publish Test Results inputs: