Skip to content

Conversation

@hoyosjs
Copy link
Member

@hoyosjs hoyosjs commented Feb 21, 2025

  • Merged PR 47050: Use WIF connection for release management
  • Fix runtime lifetime issues on error path in SOS
  • Merged PR 47053: Add auth call to release
  • Merged PR 47050: Use WIF connection for release management Code cleanup and configuration update. This pull request updates the release management process to use WIF (Workload Identity Federation) connection. - Modified prepare-release.yml to remove SAS token generation steps and update Azure subscription. - Updated AcquireBuild.ps1 to remove SAS suffixes parameter and use Azure credentials for blob access.

hoyosjs and others added 4 commits February 19, 2025 01:32
#### AI description  (iteration 1)
#### PR Classification
Code cleanup and configuration update.

#### PR Summary
This pull request updates the release management process to use WIF (Workload Identity Federation) connection.
- Modified `prepare-release.yml` to remove SAS token generation steps and update Azure subscription.
- Updated `AcquireBuild.ps1` to remove SAS suffixes parameter and use Azure credentials for blob access.
- `src/SOS/Strike/clrma/managedanalysis.cpp`: Fixed issues with `GetClrDataProcess` and `QueryInterface` calls, ensuring proper handling and reference management of `m_clrData` and `m_sosDac`. Added error handling to prevent fallback to old SOS unstructured provider.
Code cleanup and configuration update.
This pull request updates the release management process to use WIF (Workload Identity Federation) connection.
- Modified `prepare-release.yml` to remove SAS token generation steps and update Azure subscription.
- Updated `AcquireBuild.ps1` to remove SAS suffixes parameter and use Azure credentials for blob access.
@hoyosjs hoyosjs added the DO NOT MERGE do not merge this PR label Feb 21, 2025
@hoyosjs hoyosjs requested a review from a team as a code owner February 21, 2025 23:14
@mikem8361
Copy link
Contributor

@hoyosjs
Copy link
Member Author

hoyosjs commented Feb 24, 2025

That's why the no-merge. It's missing one commit

Mike McLaughlin and others added 2 commits February 27, 2025 22:37
Add DAC cert check

Calls the CLRMD signing and cert checking helper function before loading the DAC module.

The check honors the Debugger.Settings.EngineInitialization.SecureLoadDotNetExtensions setting when running under windbg. Defaults to true under dotnet-dump on Windows, false on Linux/MacOS for dotnet-dump and lldb.

TestHost (used by the Microsoft.Diagnostics.DebugServices.UnitTests, etc.) disables the signature check because all the test asset dumps used are preview 6.0 and not signed (that needs to be fixed but it is beyond the scope of this PR).
----
New feature
This pull request introduces a new feature to check DAC certificate validity.
- Added `GetSettings` method in `dbgengservices.cpp` to retrieve debugger settings.
- Implemented `DacSignatureVerificationEnabled` property in `HostServices.cs` and `DebuggerServices.cs` to enforce DAC certificate validation.
- Created new interface `ISettingsService` in `ISettingsService.cs` to define settings service.
- Updated `RuntimeWrapper.cs` to verify DAC signing and certificate before loading.
- Modified `Versions.props` to update `MicrosoftDiagnosticsRuntimeVersion` to `4.0.0-beta.24521.1`.
@hoyosjs hoyosjs removed the DO NOT MERGE do not merge this PR label Feb 28, 2025
noahfalk
noahfalk previously approved these changes Feb 28, 2025
@mikem8361
Copy link
Contributor

All the tests are failing with the below error. I can't see any problems with the merge but this command fails. Technically the tests shouldn't need to set this/turn it off.

System.Exception : 'runtimes --DacSignatureVerification:false' FAILED

@mikem8361
Copy link
Contributor

It is a new command line parsing problem.

  00:00.207: > runtimes --DacSignatureVerification:false
        00:00.209: ERROR: Object of type 'System.CommandLine.Parsing.Token' cannot be converted to type 'System.Nullable`1[System.Boolean]'.
        00:00.222: <END_COMMAND_ERROR>

@hoyosjs hoyosjs enabled auto-merge (squash) March 5, 2025 17:54
bool secureLoadDotNetExtensions = !(config.PrivateBuildTesting() || (setHostRuntime != null && setHostRuntime == "-none"));
initialCommands.Add($"dx @Debugger.Settings.EngineInitialization.SecureLoadDotNetExtensions={(secureLoadDotNetExtensions ? "true" : "false")}");
bool shouldVerifyDacSignature = !config.PrivateBuildTesting()
&& !"nightly".Equals(config.GetValue("BuildType"), StringComparison.OrdinalIgnoreCase)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add an TestConfiguration extension method for BuildType at the end of this file.

initialCommands.Add($"runtimes --DacSignatureVerification:{(config.PrivateBuildTesting() || OS.Kind != OSKind.Windows ? "false" : "true")}");
shouldVerifyDacSignature = OS.Kind == OSKind.Windows
&& !config.PrivateBuildTesting()
&& !"nightly".Equals(config.GetValue("BuildType"), StringComparison.OrdinalIgnoreCase);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the extension method here.

<BuildProjectFramework>$(TargetFrameworkLatest)</BuildProjectFramework>
<DotNetDiagnosticExtensions>$(RootBinDir)/bin/TestExtension/$(TargetConfiguration)/netstandard2.0/TestExtension.dll</DotNetDiagnosticExtensions>
<SetHostRuntime>$(DotNetRoot)/shared/Microsoft.NETCore.App/$(RuntimeFrameworkVersion)</SetHostRuntime>
<BuildType>Nightly</BuildType>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish there was a better way to do this than putting in the config file. RuntimeVersionLast is setting to the latest/nightly version. You could put code in SOSRunner.cs to get that config value and compare it to the RuntimeFrameworkVersion config property

<RuntimeSymbolsPath>$(DotNetRoot)/shared/Microsoft.NETCore.App/$(RuntimeFrameworkVersion)</RuntimeSymbolsPath>
<LLDBHelperScript>$(ScriptRootDir)/lldbhelper.py</LLDBHelperScript>

<BuildType>nightly</BuildType>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have the condition switched compared to the similar logic in the Windows config.

@hoyosjs hoyosjs merged commit b1037b7 into dotnet:main Mar 5, 2025
20 checks passed
@hoyosjs hoyosjs deleted the juhoyosa/ri-release branch March 5, 2025 23:21
@github-actions github-actions bot locked and limited conversation to collaborators Apr 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants