-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[vs17.12] Fixing the contention condition caused by RegisterResolversManifests #11612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Co-authored-by: Rainer Sigwald <[email protected]>
Member
|
Holding for a later release, removing servicing-consider for now. |
This was referenced May 2, 2025
Member
|
Since we discussed this yesterday on sync, can we restart the backport please? |
SimaTian
approved these changes
May 13, 2025
Member
|
@SimaTian please fill out the Tactics template--https://github.com/dotnet/msbuild/blob/main/.github/PULL_REQUEST_TEMPLATE/shiproom.md. Include the motivations we discussed yesterday. |
YuliiaKovalova
approved these changes
May 21, 2025
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.
Fixes #11079
Work item (Internal use):
https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2400156
Summary:
Backport of #11079 to vs17.12
There was a contention condition described #7927 (comment):
One thread enters and locks, then initializes a list, starts pushing things onto the list, which is now no longer null.
Second thread then checks, sees the list is not empty and bypasses the lock, acquires enumerator.
First thread pushes additional item into the list.
Second thread throws.
We want to backport it to 17.12 (which is 9.0.100) so it is a part of the source build.
That means that a large part of our Linux userbase which runs on source builds SDKs is exposed to the problem and they could experience failures at any time - and they won't have the fix unless we backport.
Customer Impact:
It is an annoying error that occasionally kills a multiprocessed pipeline due to a contention condition.
Fortunately it only manifests occassionaly, however it happens often enough to be noticeable. We have at least two well documented cases as of recently and even more if we extend the time window.
Regression:
No, it is a long standing bug.
Testing
src/Build.UnitTests/BackEnd/SdkResolverService_Tests.cs
test to validate the error is no longer there. (See the original ticket for discussion)
Risk
Low, the change is already rolled out and tested in the main branch.