[release/6.0] Fix bug where we reference the entry #0 in the pinned plug queue #63351
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.
Backport of #60966 to release/6.0
We reference entry #0 in the pinned plug queue even if there are no pinned plugs at all and thus the pinned plug queue contains left-over data from the mark phase.
Customer Impact
Customers reported frequent crashes when they upgraded their services to .NET 6 with Server GC.
Testing
Customers have tried and reported repeatedly and independently that their crashing services have no more crashes after the fix is applied. @PeterSolMS can comment on the testing he did when he checked in the initial fix.
Risk
Low. If we did have a pinned plug, the fix does nothing. If we do have a pinned plug, this fix does the right thing.