Skip to content
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

Fix race condition in SolutionChecksumUpdater work queue #46346

Merged
merged 1 commit into from
Jul 29, 2020

Conversation

sharwell
Copy link
Member

Fixes #46255

@sharwell sharwell requested a review from a team as a code owner July 27, 2020 13:21
{
Contract.ThrowIfFalse(_currentToken is null);
_currentToken = currentToken;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh, i've stared at thsi a bunch, and i have no feeling on what's happening here or why the new code is more correct. Can you write a non-brief explanation of what this class is trying to accomplish, how tehse two fields play into it, and why the new approach is 'correct'?

Copy link
Member Author

@sharwell sharwell Jul 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this class well enough to detail its intended functionality. An explanation of the race condition is here:

#46255 (comment)

The sequencing is complex enough that it required a handwritten derivation before I was able to construct a deterministic failure using 4 counters and 6 instances of ManualResetEventSlim.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Contributor

@jmarolf jmarolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@sharwell sharwell merged commit 79791f9 into dotnet:master Jul 29, 2020
@ghost ghost added this to the Next milestone Jul 29, 2020
@RikkiGibson RikkiGibson modified the milestones: Next, 16.8.P2 Aug 11, 2020
@sharwell sharwell deleted the updaterservice-test branch January 13, 2022 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The UpdaterService test is flaky
5 participants