[BUG] Intermittent Windows 0xC0000005 crashes in MTP test hosts with CodeCoverage on .NET 10
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- csharp
- Bereich
- testing-qa
Rechercherichtung
Start by reproducing the failure with the provided dotnet test command on Windows using .NET 10, Microsoft Testing Platform, xUnit v3, and Microsoft.Testing.Extensions.CodeCoverage. Compare coverage-enabled and disabled runs, then review related issues #232, #203, and #205 plus the MTP CrashDump and CLR minidump diagnostics. Done means the native crash cause is isolated or a reliable diagnostic path and reproduction are established.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Description
When running multiple .NET 10 test modules through Microsoft Testing Platform with Microsoft.Testing.Extensions.CodeCoverage enabled, one or more test-host processes intermittently terminate on Windows with exit code 0xC0000005 (-1073741819, access violation).
The affected test module varies between runs. Disabling coverage made the native host crashes disappear in a controlled Azure DevOps comparison.
This may be related to #232, but this report involves Windows, .NET 10, Microsoft Testing Platform, and multiple modules launched by one dotnet test invocation.
Steps to reproduce
Our pipeline runs 5 xUnit v3 test modules targeting net10.0.
With coverage enabled:
dotnet test --configuration debug --coverage --coverage-output-format cobertura --ignore-exit-code 8 --report-trx
The failure is intermittent. Across runs, different test-host processes terminate during the same overall test execution.
Example log:
==============================================================================
[Host] Selected Node version: Node24 (Strategy: Node24Strategy)
C:\Windows\system32\chcp.com 65001
Active code page: 65001
Info: .NET Core SDK/runtime 2.2 and 3.0 are now End of Life(EOL) and have been removed from all hosted agents. If you're using these SDK/runtimes on hosted agents, kindly upgrade to newer versions which are not EOL, or else use UseDotNet task to install the required version.
D:\_tool\dotnet\dotnet.exe test --configuration debug --coverage --coverage-output-format cobertura --ignore-exit-code 8 --report-trx
Running tests from D:\vsts-agents\MXHOJ-VSOBLD05-agent1\_work\4\s\MiCourt.Rest.Webhooks.Gateway.Tests\bin\Debug\net10.0\MiCourt.Rest.Webhooks.Gateway.Tests.dll (net10.0|x64)
Running tests from D:\vsts-agents\MXHOJ-VSOBLD05-agent1\_work\4\s\MiCourt.Rest.Data.Common.Test\bin\Debug\net10.0\MiCourt.Rest.Data.Common.Test.dll (net10.0|x64)
Running tests from D:\vsts-agents\MXHOJ-VSOBLD05-agent1\_work\4\s\MiCourt.Rest.Data.Test\bin\Debug\net10.0\MiCourt.Rest.Data.Test.dll (net10.0|x64)
Running tests from D:\vsts-agents\MXHOJ-VSOBLD05-agent1\_work\4\s\MiCourt.Rest.Api.Test\bin\Debug\net10.0\MiCourt.Rest.Api.Test.dll (net10.0|x64)
Running tests from D:\vsts-agents\MXHOJ-VSOBLD05-agent1\_work\4\s\MiCourt.Rest.Webhooks.Configuration.Test\bin\Debug\net10.0\MiCourt.Rest.Webhooks.Configuration.Test.dll (net10.0|x64)
D:\vsts-agents\MXHOJ-VSOBLD05-agent1\_work\4\s\MiCourt.Rest.Webhooks.Gateway.Tests\bin\Debug\net10.0\MiCourt.Rest.Webhooks.Gateway.Tests.dll (net10.0|x64) failed (3s 536ms)
Exit code: -1073741819
Error disposing 'NamedPipeServer' corresponding to handshake:
0: 10600
1: X64
2: .NET 10.0.12
3: Microsoft Windows 10.0.20348
4: 1.0.0;1.1.0;1.2.0;1.3.0;1.4.0
5: TestHost
6: D:\vsts-agents\MXHOJ-VSOBLD05-agent1\_work\4\s\MiCourt.Rest.Webhooks.Gateway.Tests\bin\Debug\net10.0\MiCourt.Rest.Webhooks.Gateway.Tests.dll
7: 85322975f7a04b2b9b3a8341ef89ad9d
8: 5ac5acd49b2b4c068324e688e6bcbd99
10: run
13: 1
14: microsoft.codecoverage;microsoft.testing.trx
15: .coverage;.trx
RunCommand: D:\vsts-agents\MXHOJ-VSOBLD05-agent1\_work\4\s\MiCourt.Rest.Webhooks.Gateway.Tests\bin\Debug\net10.0\MiCourt.Rest.Webhooks.Gateway.Tests.exe
RunArguments:
System.AggregateException: One or more errors occurred. (Pipe is broken.)
---> System.IO.IOException: Pipe is broken.
at System.IO.Pipes.PipeStream.PipeValueTaskSource.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at Microsoft.DotNet.Cli.Commands.Test.IPC.NamedPipeServer.InternalLoopAsync(CancellationToken cancellationToken)
at Microsoft.DotNet.Cli.Commands.Test.IPC.NamedPipeServer.<WaitConnectionAsync>b__17_0()
--- End of inner exception stack trace ---
D:\vsts-agents\MXHOJ-VSOBLD05-agent1\_work\4\s\MiCourt.Rest.Data.Test\bin\Debug\net10.0\MiCourt.Rest.Data.Test.dll (net10.0|x64) Zero tests ran (6s 792ms)
Exit code: -1073741819
D:\vsts-agents\MXHOJ-VSOBLD05-agent1\_work\4\s\MiCourt.Rest.Webhooks.Configuration.Test\bin\Debug\net10.0\MiCourt.Rest.Webhooks.Configuration.Test.dll (net10.0|x64) passed (19s 569ms)
D:\vsts-agents\MXHOJ-VSOBLD05-agent1\_work\4\s\MiCourt.Rest.Data.Common.Test\bin\Debug\net10.0\MiCourt.Rest.Data.Common.Test.dll (net10.0|x64) passed (41s 011ms)
D:\vsts-agents\MXHOJ-VSOBLD05-agent1\_work\4\s\MiCourt.Rest.Api.Test\bin\Debug\net10.0\MiCourt.Rest.Api.Test.dll (net10.0|x64) passed (2m 14s 692ms)
The affected hosts do not produce their expected .trx or .cobertura.xml files. Other test modules continue and complete successfully.
The crash sequence logs show that the hosts were executing managed tests when they disappeared. The last active tests varied and used unrelated code paths, so they appear to be crash victims rather than deterministic causes.
Comparison without coverage
The same branch was run with coverage disabled. This run completed all test modules without native host crashes.
The previously affected test modules passed, and there were no 0xC0000005 , broken-pipe, or zero-test host failures.
Environment
• OS: Windows Server self-hosted Azure DevOps build agents
• Runtime/SDK: .NET SDK 10.0.0
• Target framework: net10.0
• Architecture: x64
• Test platform: Microsoft Testing Platform selected by global.json
• Test framework: xUnit v3 4.0.1
• Coverage extension: Microsoft.Testing.Extensions.CodeCoverage 18.11.2
• Coverage output format: Cobertura
• CI system: Azure DevOps Pipelines
Workaround
Disable CodeCoverage collection.
This prevents the native crashes but removes coverage data. Coverage with reduced test-module parallelism has not yet been tested as a separate comparison.
Diagnostics
The in-process MTP CrashDump extension and CLR minidump environment variables did not capture a usable dump for this native failure.
We can provide full Azure DevOps logs, project files, package assets, additional crash sequence logs, and a run with reduced module parallelism or verbose CodeCoverage diagnostics.
Related issues
• #232 — native instrumentation/access-violation process termination; closest related report
• #203 — CodeCoverage-related hard crash on .NET 10, with a different exception
• #205 — CodeCoverage test-isolation limitation
- Vorherrschende Sprache
- C#
- Sterne
- 125
- Forks
- 17
- Ø Merge
- 1 Std. 15 Min.
- Gemergte PRs (30 T.)
- 2
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/codecoverage
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
microsoft/codecoverage#253 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 65/100
microsoft/codecoverage#252 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
microsoft/codecoverage#251 ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
microsoft/codecoverage#220 · 2 Kommentare ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 66/100
microsoft/codecoverage#218 ·
Alle Issues in microsoft/codecoverage
Ähnliche Issues
-
type/automation type/tech-debt
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
no-stack-trace
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
v9 review: TestingOffendocs/external squad/utforming
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Altinn/altinn-studio#21041 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
stryker-mutator/stryker-net#3892 ·
Maintainer antworten meist innerhalb von 1 Tag