Skip to content

Re-enable Linux code coverage to reproduce instrumentation AccessViolationException, - #1461

Open
fhnaseer wants to merge 18 commits into
dotnet:mainfrom
fhnaseer:fhnaseer/enable-linux-coverage-repro
Open

Re-enable Linux code coverage to reproduce instrumentation AccessViolationException,#1461
fhnaseer wants to merge 18 commits into
dotnet:mainfrom
fhnaseer:fhnaseer/enable-linux-coverage-repro

Conversation

@fhnaseer

@fhnaseer fhnaseer commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

This re-enables code coverage collection on the Linux CI leg, reverting the workflow workaround added in #1452, so the coverage-instrumentation AccessViolationException tracked in microsoft/codecoverage#238 can be reproduced in this repo's CI.

Related: microsoft/codecoverage#238

Change

  • .github/workflows/build.yml — drops the -NoCoverage flag from the 🧪 test step so coverage runs on Linux (as well as Windows/macOS), and removes the if: runner.os != 'Linux' restriction on the 📢 Publish code coverage results to codecov.io step so Linux publishes too (the CODECOV_TOKEN guard is kept).
  • Bumps the coverage tooling to 18.10.0 (.config/dotnet-tools.json dotnet-coverage and Microsoft.Testing.Extensions.CodeCoverage in Directory.Packages.props) — the latest version, which AArnott confirmed still reproduces the AV.

No product/source code or tests are changed. The crash-dump diagnostics added in #1452 remain intact so the AV is capturable.

Expected behavior

The AV is an intermittent, timing/memory-pressure-sensitive race — per the issue it appeared in ~17 of 18 Linux runs, only on the 4-vCPU hosted runner, and never on Windows. It is expected that the Linux test leg may crash with an AccessViolationException; that is the intended repro signal for microsoft/codecoverage#238. A clean Linux run does not disprove the bug, since the crash only manifests on a fraction of runs.

Reproduced on this branch (workflow-only, 18.9.0): https://github.com/dotnet/Nerdbank.GitVersioning/actions/runs/31688005225 — Linux test host crashed with System.AccessViolationException (Fatal error, exit code 7), minidump + crash report captured.

fhnaseer and others added 18 commits August 13, 2026 11:11
…ationException,

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ception repro,

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…13.3,

Try preview code coverage package that may fix the Linux AccessViolationException from microsoft/codecoverage#238.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…review,

The 18.11.0-preview.26413.3 coverage bump shifted the Microsoft.Testing.Platform
graph so xunit.v3.core.mtp-v2's transitive request for
Microsoft.Testing.Platform.MSBuild >= 2.0.2 got substituted to 2.1.0 (NU1603),
which fails under TreatWarningsAsErrors. Explicitly pin Microsoft.Testing.Platform
and Microsoft.Testing.Platform.MSBuild to $(MicrosoftTestingPlatformVersion)
(2.3.3) so the whole family is aligned and no substitution occurs.

Also revert the Microsoft.Testing.Platform* test-tools feed mapping: the dnceng
test-tools feed only hosts 1.0.0-alpha of those packages, so mapping them there
would break restore.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…109,

The 18.11.0-preview.26413.3 coverage package transitively requires
Microsoft.Testing.Platform >= 2.4.0-preview.26411.1, so pinning the family at
2.3.3 triggered an NU1109 package downgrade. Raise
$(MicrosoftTestingPlatformVersion) to 2.4.0-preview.26411.1 (drives Platform,
.MSBuild, and the CrashDump/HangDump/Telemetry/TrxReport extensions). All are
published on nuget.org and the dnceng test-tools feed at this version.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Now that 2.4.0-preview.26411.1 of Microsoft.Testing.Platform and Microsoft.Testing.Platform.MSBuild are published on the dnceng test-tools feed, map them there via packageSourceMapping so the preview platform packages come from the same feed as the coverage preview.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The 2.4.0-preview.26411.1 platform bump broke restore with NU1102: the CrashDump/HangDump/Telemetry/TrxReport extensions at that preview version are published only on the dnceng test-tools feed, not nuget.org, but they were routed to nuget via the catch-all mapping. Broaden the test-tools mapping to Microsoft.Testing.* so the whole family resolves there, and mirror Microsoft.Testing.* / Microsoft.CodeCoverage* under the nuget source at equal pattern length so both feeds are considered and any package not on test-tools still falls back to nuget.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

1 participant