fix(build): hold the coverage collector at 18.10.0 - #4453
Merged
Conversation
- On 18.11.0 a test host that passed every test aborts with SIGABRT while the session finishes, and the run reports exit code 7. - The collector's SharedBufferReconciler waits on a cross-process mutex. A solution-wide run hands that mutex between many hosts, so when one exits still owning it the next waiter gets an AbandonedMutexException the collector does not handle. - It hits whichever assembly loses the race, which is why only the macOS leg went red.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4453 +/- ##
=======================================
Coverage 93.92% 93.92%
=======================================
Files 359 359
Lines 15105 15105
Branches 1568 1568
=======================================
Hits 14188 14188
Misses 674 674
Partials 243 243 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What kind of change does this PR introduce?
Build fix. One version pin, no product or test source changes.
What is the new behavior?
A solution-wide run finishes cleanly, and the coverage it reports is complete again.
Microsoft.Testing.Extensions.CodeCoverageis held at 18.10.0.Union coverage over a full
dotnet test --solution --coveragerun, same commit, only the collector version differing:The aborting host never reconciles its buffers, so its data is dropped and the reported number silently falls by about 5.3 points of line coverage. The pin recovers it.
The pin carries a comment describing the failure, so the next bump gets checked against it rather than taken on trust.
What is the current behavior?
A test host that has run every test successfully aborts during session teardown, and the run reports exit code 7:
SharedBufferReconcilerwaits on a cross-process mutex to reconcile coverage buffers. A solution-wide run passes that mutex between many concurrently running hosts, so when one exits while still owning it the next waiter is handed anAbandonedMutexException, which the collector does not handle. The exception goes unhandled, the process aborts with SIGABRT, and the platform maps that to exit code 7.It lands on whichever assembly loses the race rather than on a particular test, which is why a single arbitrary assembly went red while its near-identical sibling passed in the same run. All 34300 tests pass either way; the crash is purely in teardown.
18.11.0 is the newest published version, so there is no later release to move forward to.
What might this PR break?
Microsoft.Testing.Extensions.CodeCoverageis test-only tooling and is not a dependency of any published package.Microsoft.Testing.Platform.MSBuilddeliberately stays at 2.4.0. It appears in the stack only as the calling frame; the defect is in the collector.Checklist
mainbranchAdditional information
The crash needs the whole solution running concurrently, not one assembly: looping a single test project 25 times never reproduced it, while a full
--coveragesolution run reproduced exit 7 on Linux as well. It is a race across hosts, not something specific to the macOS runner.The stack is not visible through
--log-failed, which shows only the runner's exit code; it is in the full job log.