From 8794fe63d9415d093008b2971a5cb3a2c98ee971 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Thu, 4 Dec 2025 12:13:04 +0100 Subject: [PATCH 1/3] Document hangdump known issues on macos --- ...testing-platform-extensions-diagnostics.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md b/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md index 06b38ecbb09c3..a211ebeec500f 100644 --- a/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md +++ b/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md @@ -61,3 +61,45 @@ To configure the hang dump file generation, use the following options: | `-⁠-hangdump-filename` | Specifies the file name of the dump. | | `--hangdump-timeout` | Specifies the timeout after which the dump is generated. The timeout value is specified in one of the following formats:
`1.5h`, `1.5hour`, `1.5hours`
`90m`, `90min`, `90minute`, `90minutes`
`5400s`, `5400sec`, `5400second`, `5400seconds`. Defaults to `30m` (30 minutes). | | `--hangdump-type` | Specifies the type of the dump. Valid values are `Mini`, `Heap`, `Triage`, `Full`. Defaults as `Full`. For more information, see [Types of mini dumps](../diagnostics/collect-dumps-crash.md#types-of-mini-dumps). | + +### Considerations for macOS + +Taking dumps when running on macOS can be problematic. If you found that a dump has started to be taken, but never finishes, in CI environments where you don't have direct access to the machine, this most likely means that macOS showed a popup asking for authentication and is waiting for you to type password, which is not feasible to do in such environments. The issue might also manifest as an error similar to the following: + +```output +[createdump] This failure may be because createdump or the application is not properly signed and entitled. +``` + +To workaround this, there are two options: + +- Set `UseAppHost` MSBuild property to false, which will cause the managed assembly to run under `dotnet` instead of the apphost executable. However, this doesn't work for xunit.v3. See [xunit/xunit#3432 GitHub issues](https://github.com/xunit/xunit/issues/3432). +- Apply a workaround similar to the following: + + ```xml + + + + ``` + + and the contents of `mtp-test-entitlements.plist` should be: + + ```xml + + + + + com.apple.security.cs.allow-jit + + com.apple.security.cs.allow-dyld-environment-variables + + com.apple.security.cs.disable-library-validation + + com.apple.security.cs.debugger + + com.apple.security.get-task-allow + + + + ``` + + The MSBuild target above can be placed in Directory.Build.targets so that it applies to all projects. From 8f136d7bc9abc4b889f7cf3e4191f11ec5d5ddea Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Thu, 4 Dec 2025 12:14:37 +0100 Subject: [PATCH 2/3] Fix syntax --- .../microsoft-testing-platform-extensions-diagnostics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md b/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md index a211ebeec500f..c0e0c8318e474 100644 --- a/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md +++ b/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md @@ -76,7 +76,7 @@ To workaround this, there are two options: - Apply a workaround similar to the following: ```xml - + ``` From 9c905849751db0b015781784494cb6fc0e2ea054 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Thu, 4 Dec 2025 12:20:48 +0100 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../microsoft-testing-platform-extensions-diagnostics.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md b/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md index c0e0c8318e474..373184acfc806 100644 --- a/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md +++ b/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md @@ -64,15 +64,15 @@ To configure the hang dump file generation, use the following options: ### Considerations for macOS -Taking dumps when running on macOS can be problematic. If you found that a dump has started to be taken, but never finishes, in CI environments where you don't have direct access to the machine, this most likely means that macOS showed a popup asking for authentication and is waiting for you to type password, which is not feasible to do in such environments. The issue might also manifest as an error similar to the following: +Taking dumps when running on macOS can be problematic. If you found that a dump has started to be taken, but never finishes, in CI environments where you don't have direct access to the machine, this most likely means that macOS showed a popup asking for authentication and is waiting for you to type a password, which is not feasible to do in such environments. The issue might also manifest as an error similar to the following: ```output [createdump] This failure may be because createdump or the application is not properly signed and entitled. ``` -To workaround this, there are two options: +To work around this, there are two options: -- Set `UseAppHost` MSBuild property to false, which will cause the managed assembly to run under `dotnet` instead of the apphost executable. However, this doesn't work for xunit.v3. See [xunit/xunit#3432 GitHub issues](https://github.com/xunit/xunit/issues/3432). +- Set `UseAppHost` MSBuild property to false, which will cause the managed assembly to run under `dotnet` instead of the apphost executable. However, this doesn't work for xunit.v3. See [xunit/xunit#3432 GitHub issue](https://github.com/xunit/xunit/issues/3432). - Apply a workaround similar to the following: ```xml