[BUG] Intermittent Windows 0xC0000005 crashes in MTP test hosts with CodeCoverage on .NET 10
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- csharp
- Domaine
- testing-qa
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- C#
- Étoiles
- 125
- Forks
- 17
- Merge moyen
- 1 h 15 min
- PR mergées (30 j)
- 2
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoft/codecoverage
-
Difficulté 3/5 1-2 jours Accessibilité débutants 65/100
microsoft/codecoverage#252 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 52/100
microsoft/codecoverage#251 ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
microsoft/codecoverage#220 · 2 commentaires ·
-
False positive branch coverageOuverte
Difficulté 3/5 1-2 jours Accessibilité débutants 66/100
microsoft/codecoverage#218 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
microsoft/codecoverage#205 ·
Toutes les issues de microsoft/codecoverage
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
Les mainteneurs répondent en général sous 1 jour
-
:watch: Not Triaged aspnet-core/svc fundamentals/subsvc Source - Docs.ms
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
dotnet/AspNetCore.Docs#37785 ·
Les mainteneurs répondent en général sous 1 jour
-
needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Les mainteneurs répondent en général sous 1 jour
-
needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
Azure/azure-sdk-tools#17204 ·
Les mainteneurs répondent en général sous 1 jour
-
Проблема с Dotnet RUOuvertearea-tutorials needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
dotnet/website-feedback#1779 ·