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

Prevent potential deadlocks when reading/writing assets #47864

Merged
merged 14 commits into from
Sep 29, 2020

Conversation

tmat
Copy link
Member

@tmat tmat commented Sep 19, 2020

Instead of reading and writing synchronously to RPC stream use and intermediate pipe with unbounded buffer on both ends. These local pipes allow us to synchronously read/write while (de)serializing and asynchronously copy the serialized data over to the RPC pipe.

Fixes cancellation handling during reading version bytes of serialized content.

Completes fix of RPC hangs like #47720

@tmat tmat force-pushed the AssetStreamingFix branch 2 times, most recently from 681baa9 to ae3ccb0 Compare September 19, 2020 16:29
@tmat tmat force-pushed the AssetStreamingFix branch 4 times, most recently from 2814455 to d441851 Compare September 24, 2020 00:08
@tmat tmat changed the title Asset streaming fix Prevent potential deadlocks when reading/writing assets Sep 24, 2020
@tmat tmat changed the base branch from master to release/dev16.8 September 24, 2020 00:09
@tmat tmat marked this pull request as ready for review September 24, 2020 00:10
@tmat tmat requested review from a team as code owners September 24, 2020 00:10
@tmat tmat requested a review from a team as a code owner September 24, 2020 03:02
@tmat
Copy link
Member Author

tmat commented Sep 24, 2020

@CyrusNajmabadi @sharwell PTAL

@tmat tmat modified the milestones: 16.8, 16.8.P4 Sep 24, 2020
@tmat tmat force-pushed the AssetStreamingFix branch 2 times, most recently from bec57ed to 94b4b99 Compare September 28, 2020 18:46
Copy link
Member

@sharwell sharwell left a comment

Choose a reason for hiding this comment

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

This has reached a point where it's a clear improvement for 16.8, and we can iterate on locations for clarity in follow-up work.

@sharwell sharwell merged commit f60ff7e into dotnet:release/dev16.8 Sep 29, 2020
tmat added a commit to tmat/roslyn that referenced this pull request Oct 1, 2020
This reverts commit 4123b1c.

Revert "Do not cancel operations after point of no return"

This reverts commit 57759e3.

Revert "Remove ClientDisconnectedSource"

This reverts commit 24bcf13.

Revert "Wait for GetAssetsAsync before returning"

This reverts commit c020fe8.

Revert "Make sure to complete copy before returning"

This reverts commit ebb674f.

Revert "Prevent potential deadlocks when reading/writing assets (dotnet#47864)"

This reverts commit f60ff7e.

Revert "Ensure IServiceBroker is used on a background thread"

This reverts commit 1f7397e.

Revert "Provide required callback targets"

This reverts commit e0e3655.

Revert "Ensure IServiceBroker is used on a background thread"

This reverts commit 42202d8.

Revert "Use MessagePack for serialization, move services to IServiceBroker (dotnet#47461)"

This reverts commit e91ccb5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants