Repository navigation
Fix SOS managed hosting on macOS - #6243
Merged
Merged
Conversation
Default PAL_MachExceptionMode to 7 on macOS without replacing user settings. When an automatically selected .NET 10 host fails initialization, retry once with .NET 11 from the same installation. Preserve explicit runtime paths, DOTNET_ROOT precedence, and other platforms' probing behavior. Add focused Apple LLDB regression tests using a prebuilt failing runtime fixture, include it in the Helix payload, and document the fallback. Co-authored-by: Copilot App <[email protected]>
tommcdon
reviewed
Nov 14, 2026
tommcdon
approved these changes
Nov 14, 2026
tommcdon
left a comment
Member
There was a problem hiding this comment.
Left a comment for your review, otherwise LGTM
Match the unique test directory and runtime suffix rather than the parent path, which macOS canonicalizes from /tmp to /private/tmp. Co-authored-by: Copilot App <[email protected]>
Member
Author
|
|
max-charlamb
approved these changes
Nov 14, 2026
max-charlamb
approved these changes
Nov 14, 2026
Member
Author
|
/ba-g Unrelated |
steveisok
enabled auto-merge (squash)
November 14, 2026 15:59
hoyosjs
added a commit
that referenced
this pull request
Nov 14, 2026
SOS now prefers .NET 11 over .NET 10 on all platforms, avoiding a .NET 10 hosting failure under Apple LLDB. This replaces the retry added in #6243; retrying after initialization fails is unnecessary when .NET 11 can be selected first. The PAL_MachExceptionMode default is preserved. Manually verified with Apple LLDB attached to a .NET 10 process: SOS hosted on .NET 11, and managed inspection commands succeeded. Co-authored-by: Copilot App <[email protected]>
This was referenced Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SOS can be killed when CoreCLR replaces Apple LLDB's guarded Mach exception ports. With that avoided, an automatically selected .NET 10 host can still fail initialization with
0x8007000C, even when a working .NET 11 runtime is installed alongside it.PAL_MachExceptionModeto7on macOS without replacing an explicit user value.coreclr_initialize, retry once with .NET 11 from the same installation. PreserveDOTNET_ROOTprecedence and explicitsethostruntimepaths. Keep the existing probing helpers and runtime order unchanged; Windows/Linux behavior is unchanged.Validation
./build.sh -skipmanaged -configuration Release -architecture arm64passed../.dotnet/dotnet build src/tests/SOS.Tests/SOS.Tests.csproj -c Release --no-restore -p:TargetArch=arm64 -p:TargetRid=osx-arm64passed.PAL_MachExceptionModeoverride, recovered from the real .NET 10.0.9 initialization failure, and hosted SOS on .NET 11.0.0.sosstatus,clrthreads,clrstack) and NativeAOT (sosstatus,clrthreads, including the expectedSystem.NullReferenceException). NativeAOT validation used a separately provisioned matching managed-extension/cDAC payload with the rebuilt native SOS libraries.Windows/Linux execution was not performed locally.