[release/7.0] Update ds-ipc-pal-namedpipe to fix shutdown race#89620
Merged
hoyosjs merged 1 commit intorelease/7.0-stagingfrom Aug 11, 2023
Merged
[release/7.0] Update ds-ipc-pal-namedpipe to fix shutdown race#89620hoyosjs merged 1 commit intorelease/7.0-stagingfrom
hoyosjs merged 1 commit intorelease/7.0-stagingfrom
Conversation
lateralusX
approved these changes
Jul 28, 2023
jeffschwMSFT
approved these changes
Jul 31, 2023
Member
jeffschwMSFT
left a comment
There was a problem hiding this comment.
approved. we will take for consideration in 7.0.x
Contributor
|
Friendly reminder: if you want this servicing fix to be included in the September 2023 Release, you'll have to merge this PR before August 14th. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Partial fix for #89621
Description
Works around a regression introduced in 7.0.9 around reading/writing to the IPC while VM shutdown is happening. The diagnostic server thread might race VM shutdown, and end up using an IPC handle that has been closed as part of a GetOverlappedResult call, that in turn will end up closing the handle.
The shutdown cleanup was added as a measure to ensure mono on Windows embedding scenarios would work after the EventPipe IPC got torn down.
Customer Impact
This can lead to hard to diagnose bugs on embedding scenarios where handle reuse is possible and the race will cause reused handles to be closed or odd reading behavior that's hard to diagnose. Currently EventPipe doesn't have any coordination mechanism during shutdown to make sure diagnostic server thread stops during shutdown, so it can't close any of the resources since they might still be used and their error paths lead to unexpected results.
Regression
Fixes regression introduced during last servicing.
Risk
Regresses scenario of embedding mono on Windows.