Fix flaky CanShutdownServerProcess test#7871
Merged
rokonec merged 14 commits intodotnet:mainfrom Aug 14, 2022
Merged
Conversation
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
The current test failure is from OldNugetTest. Are we using the server by default now? If so, it may be creating a server process, then expecting it to exit, and it doesn't (nor should it). If that's it, we may need to disable the server for that test. |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Forgind
reviewed
Aug 10, 2022
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Forgind
approved these changes
Aug 11, 2022
Contributor
Forgind
left a comment
There was a problem hiding this comment.
Looks great! I'm assuming the test passed for all the retries you did?
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Context
We detected flaky unit tests related to msbuild server shutdown.
Example of failing checks: #7835
Root cause:
When server finish its build it eventually drops namedpipe, open new one with same name and start listen on it.
If clients is trying to connect to server during this brief time, all kinds of exceptions could happen.
Changes Made
a) Previously named mutex server-is-running was by server dropped after project weas build and re-acquired shortly after. Changes was made so mutex is acquired constantly.
b) Client retries during connection to server, which address all weird race conditions when server recycling named-pipe.
Testing
Several
/azp runsCan't repro on Linux and MacOS even though I could before final changes.
Notes
Same bug is also possible while connecting to working nodes. In such case though, the worst that could happen though is that we span one unnecessary node which is, considering low probability of this to happen, acceptable.