Description
On macOS arm64, Process.Kill(entireProcessTree: true) can block indefinitely while terminating process trees created by the dotnet-watch tests.
This appeared after consuming the runtime flow containing #128598, which introduced the two-phase stop-then-kill implementation on Unix.
Enable dotnet-watch tests on mac once fixed: dotnet/sdk#55679
Reproduction Steps
-
From a dotnet/sdk checkout at commit dc6cef6, run the dotnet-watch.Tests suite on macOS 15 arm64. In CI, this is Helix shard dotnet-watch.Tests.dll.2 on queue osx.15.arm64.open.
-
Allow tests to dispose their child processes using Process.Kill(entireProcessTree: true).
-
Observe that some calls never return.
A standalone runtime-only reproduction has not yet been reduced. The failure reproduces in the SDK CI shard linked below.
Expected behavior
Process.Kill(entireProcessTree: true) terminates the process tree and returns promptly.
Actual behavior
Instrumentation logged nine calls entering Process.Kill(entireProcessTree: true), but only three returned. Helix eventually detected the hang, collected dumps, and terminated the test process:
[TEST AwaitableProcess.cs:237] Killing process tree for process 18251
Hang dump timeout of '00:48:00' expired
Test application process didn't exit gracefully, exit code is '137'
One separate call returned from Kill, but its process still did not exit within 30 seconds.
Regression?
Observed after the SDK consumed the runtime flow containing #128598. That PR changed Unix process-tree termination to recursively stop the tree before killing it.
Confidence is high that the immediate hang occurs synchronously inside Process.Kill(entireProcessTree: true). Confidence that #128598 introduced the regression is moderate pending a reduced runtime-only reproduction.
Known Workarounds
None currently. Bounding the subsequent wait does not help because the call to Process.Kill itself does not return.
Configuration
- macOS 15
- arm64
- Helix queue:
osx.15.arm64.open
- Work item:
dotnet-watch.Tests.dll.2
- .NET 11 runtime consumed by the SDK flow
Other information
Description
On macOS arm64,
Process.Kill(entireProcessTree: true)can block indefinitely while terminating process trees created by thedotnet-watchtests.This appeared after consuming the runtime flow containing #128598, which introduced the two-phase stop-then-kill implementation on Unix.
Enable dotnet-watch tests on mac once fixed: dotnet/sdk#55679
Reproduction Steps
From a
dotnet/sdkcheckout at commitdc6cef6, run thedotnet-watch.Testssuite on macOS 15 arm64. In CI, this is Helix sharddotnet-watch.Tests.dll.2on queueosx.15.arm64.open.Allow tests to dispose their child processes using
Process.Kill(entireProcessTree: true).Observe that some calls never return.
A standalone runtime-only reproduction has not yet been reduced. The failure reproduces in the SDK CI shard linked below.
Expected behavior
Process.Kill(entireProcessTree: true)terminates the process tree and returns promptly.Actual behavior
Instrumentation logged nine calls entering
Process.Kill(entireProcessTree: true), but only three returned. Helix eventually detected the hang, collected dumps, and terminated the test process:One separate call returned from
Kill, but its process still did not exit within 30 seconds.Regression?
Observed after the SDK consumed the runtime flow containing #128598. That PR changed Unix process-tree termination to recursively stop the tree before killing it.
Confidence is high that the immediate hang occurs synchronously inside
Process.Kill(entireProcessTree: true). Confidence that #128598 introduced the regression is moderate pending a reduced runtime-only reproduction.Known Workarounds
None currently. Bounding the subsequent wait does not help because the call to
Process.Killitself does not return.Configuration
osx.15.arm64.opendotnet-watch.Tests.dll.2Other information