From c61415f6d640110859712662efcab8a6eb61ec98 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 28 Feb 2023 16:12:34 -0800 Subject: [PATCH 1/2] Download and install sos to use it to dump managed stacks. --- eng/Versions.props | 2 ++ .../Coreclr.TestWrapper/CoreclrTestWrapperLib.cs | 7 +++++-- src/tests/Common/helixpublishwitharcade.proj | 10 ++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 2a905374ec7343..fd8d88b85a9291 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -182,6 +182,8 @@ $(MicrosoftBuildVersion) 6.2.2 6.2.2 + 7.0.412701 + 6.0 1.1.0 17.4.0-preview-20220707-01 diff --git a/src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs b/src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs index 7f11d0cf203a07..62eb196ce820c0 100644 --- a/src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs +++ b/src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs @@ -601,10 +601,13 @@ static bool TryPrintStackTraceFromDmp(string dmpFile, StreamWriter outputWriter) return false; } + string sosPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".dotnet", "sos", "sos.dll"); + var cdbScriptPath = Path.GetTempFileName(); - // TODO: Add SOS support once we can easily download SOS to install. - File.WriteAllText(cdbScriptPath, """ + File.WriteAllText(cdbScriptPath, $$""" + .load {{sosPath}} ~*k + !clrstack -f -all q """); diff --git a/src/tests/Common/helixpublishwitharcade.proj b/src/tests/Common/helixpublishwitharcade.proj index 247bd3c0179f7f..9021ca40440fc6 100644 --- a/src/tests/Common/helixpublishwitharcade.proj +++ b/src/tests/Common/helixpublishwitharcade.proj @@ -725,6 +725,10 @@ + + sos + https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/flat2/dotnet-sos/$(DotnetSosVersion)/dotnet-sos.$(DotnetSosVersion).nupkg + @@ -867,4 +871,10 @@ + + + + $(HelixPreCommands);dotnet %25HELIX_CORRELATION_PAYLOAD%25\sos\tools\net$(DotnetSosTargetFrameworkVersion)\any\dotnet-sos.dll install + + From c70f3114c5dba264778aae76b5db466295a50df8 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 15 Mar 2023 11:28:32 -0700 Subject: [PATCH 2/2] Specify target arch --- src/tests/Common/helixpublishwitharcade.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/Common/helixpublishwitharcade.proj b/src/tests/Common/helixpublishwitharcade.proj index 9021ca40440fc6..1bacf4b9313a11 100644 --- a/src/tests/Common/helixpublishwitharcade.proj +++ b/src/tests/Common/helixpublishwitharcade.proj @@ -874,7 +874,7 @@ - $(HelixPreCommands);dotnet %25HELIX_CORRELATION_PAYLOAD%25\sos\tools\net$(DotnetSosTargetFrameworkVersion)\any\dotnet-sos.dll install + $(HelixPreCommands);dotnet %25HELIX_CORRELATION_PAYLOAD%25\sos\tools\net$(DotnetSosTargetFrameworkVersion)\any\dotnet-sos.dll install --architecture $(TargetArchitecture)