From 83610a72d70cfe55e62e98c1f13e786b88d70220 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Fri, 20 Dec 2024 12:01:55 +0100 Subject: [PATCH 1/2] 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: From d0479b4cd4e836ad907a4c9c191d08295d2e231f Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Wed, 8 Jan 2025 20:32:42 +0100 Subject: [PATCH 2/2] Update file paths in azure-pipelines-PR.yml --- azure-pipelines-PR.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index df48a4c30e0..615523c88b5 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -558,7 +558,7 @@ stages: 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 + DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/$(Build.BuildId)-%e-%p-%t.dmp displayName: Build / Test - task: PublishTestResults@2 displayName: Publish Test Results @@ -615,7 +615,7 @@ stages: 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 + DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/$(Build.BuildId)-%e-%p-%t.dmp displayName: Build / Test - task: PublishBuildArtifacts@1 displayName: Publish Dumps