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

Sched combiner closures instead of running to avoid data races #19531

Merged
merged 2 commits into from
Jul 11, 2019

Conversation

yashykt
Copy link
Member

@yashykt yashykt commented Jul 2, 2019

A change similar to #18491.
GRPC_CLOSURE_RUN runs the closure immediately. In our case, if we do that, we can end up with a use-after-free kind of bug, since we need to reference some elements in the op structure even after scheduling the closure.

By scheduling instead of running, we guarantee that the closures will not be run before we are done using the struct since we are using a combiner.

Fixes internal bug - b/132890439

@yashykt yashykt requested a review from yang-g July 2, 2019 18:56
@yashykt yashykt added the release notes: no Indicates if PR should not be in release notes label Jul 2, 2019
@yashykt
Copy link
Member Author

yashykt commented Jul 11, 2019

Known issues : #19422, #19170

@yashykt yashykt merged commit 825e3dc into grpc:master Jul 11, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 9, 2019
@yashykt yashykt deleted the nullthensched branch May 18, 2023 20:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release notes: no Indicates if PR should not be in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants