Skip to content

Provision the macOS SOS host runtime independently - #6240

Merged
max-charlamb merged 2 commits into
mainfrom
akoeplinger-sos-launcher-runtime
Nov 13, 2026
Merged

max-charlamb merged 2 commits into
mainfrom
akoeplinger-sos-launcher-runtime

Conversation

@akoeplinger

Copy link
Copy Markdown
Member

Summary

Addresses the macOS SOS/SOS_EnumMemory launcher failures tracked in dotnet/runtime#137493.

The macOS launcher explicitly starts the net10.0 test application with --fx-version selecting .NET 11. The harness independently selects .NET 11 to host SOS's managed extension because of a CoreCLR hosting fix. However, SOS work items only declared the .NET 10 test-host runtime and the debuggee runtime as dependencies. Private .NET 12 runs no longer incidentally provision .NET 11, so the private overlay succeeds and the launcher exits with code 3 before tests start.

Explicitly include the pinned .NET 11 runtime in macOS SOS work-item requirements, independently of the debuggee matrix. Preserve the existing .NET 10, private-runtime, and packaged-tool requirements. Windows and Linux runtime selection is unchanged; the Windows launcher uses normal net10.0 selection rather than the macOS-specific --fx-version override.

Unrelated macOS build prerequisite

The second commit ports the native feature-probe approach from dotnet/runtime#134073, the follow-up to dotnet/runtime#134028.

This pipe2 fix is unrelated to the missing-runtime failure, but is necessary to compile diagnostics with recent Xcode on macOS. Symbol-only detection finds pipe2 in the newer SDK even when the deployment target cannot use it, causing PAL compilation to fail. Make supported availability warnings errors during feature probes and check pipe2 through unistd.h, with _GNU_SOURCE scoped to that check for Linux compatibility.

Validation

  • ./.dotnet/dotnet build src/tests/SOS.Tests/SOS.Tests.csproj -c Release --no-restore -p:TargetArch=arm64 -p:TargetRid=osx-arm64: passed, 0 warnings/errors.
  • ./build.sh -skipmanaged -configuration Release -architecture arm64: passed, including PAL, native SOS, dbgshim, and sos-lldb.
  • Existing SOS.Tests.TestConfigValidityTests.*: 25/25 passed on real .NET 11, directly and through the actual Unix launcher with the newly built LLDB driver.
  • Reproduced launcher exit 3 without .NET 11 after a successful private-runtime overlay; adding the declared runtime allows the test application to run. The private .NET 12 layout in this isolated launcher fixture is synthetic; this is not a full private-runtime SOS matrix run.
  • Actual CreateHelixPayload metadata checked in 16 isolated combinations: macOS ARM64/x64, Linux x64, Windows x64, each with normal/private/packaged/servicing inputs. Payload staging was stubbed; runtime requirements, shard identities, and private-overlay commands were evaluated by the real target. The actual shared sender converts the private macOS requirements into .NET 10, .NET 11, and .NET 12 runtime packages.
  • Compared two fresh full CMake configurations with identical sources apart from the two CMake edits, compiler, SDK, deployment target, and Release/ARM64 flags: HAVE_PIPE2 is the only existing cached feature result that changes (1 to false). The sole new result is the compiler availability-warning support check.
  • Exact probe blocks reject pipe2 for macOS 12, accept it for macOS 27, and accept it with GNU GCC 13.3 on Linux. GNU feature definitions do not leak beyond the probe.
  • git diff --check and Bash syntax checks passed.

Existing CMake build trees need their cached HAVE_PIPE2 result refreshed; native validation used a fresh Release configuration. Windows launcher execution and the full SOS debuggee matrix were not run locally.

cc @max-charlamb @steveisok

akoeplinger and others added 2 commits November 13, 2026 12:52
Keep the .NET 11 runtime required by the macOS launcher and managed extension independent of the debuggee runtime matrix, including private .NET 12 runs.

Co-authored-by: Copilot App <[email protected]>
Port the deployment-aware availability probes from dotnet/runtime#134073 and check pipe2 through unistd.h with scoped GNU feature definitions.

Co-authored-by: Copilot App <[email protected]>
@akoeplinger
akoeplinger requested a review from a team as a code owner November 13, 2026 11:52
@max-charlamb

Copy link
Copy Markdown
Member

/ba-g flaky test

@max-charlamb
max-charlamb merged commit a1c64ac into main Nov 13, 2026
22 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants