Skip to content

Revert "Revert "Replace work serializer with a mutex in c-ares resolver" #28324"#28325

Merged
apolcyn merged 4 commits intogrpc:masterfrom
apolcyn:revert_revert_mutex
Dec 9, 2021
Merged

Revert "Revert "Replace work serializer with a mutex in c-ares resolver" #28324"#28325
apolcyn merged 4 commits intogrpc:masterfrom
apolcyn:revert_revert_mutex

Conversation

@apolcyn
Copy link
Copy Markdown
Contributor

@apolcyn apolcyn commented Dec 9, 2021

Reverts #28324, after adding what I believe is the fix (in the second commit here):

Access to the ares_request field of grpc_resolve_address_ares_request used to be synchronized by the work serializer, but was made unsynchronized by #27858

It needs to be synchronized because, for example, when calling r->ares_requset = grpc_dns_lookup_ares(...), I/O for the request can be picked up by another thread and cause that thread to schedule on_done (where we delete r->ares_request), all before writing the return value to r->ares_request.

@apolcyn apolcyn requested a review from markdroth as a code owner December 9, 2021 18:09
@apolcyn apolcyn added lang/core release notes: no Indicates if PR should not be in release notes labels Dec 9, 2021
@markdroth
Copy link
Copy Markdown
Member

Looks great!

@apolcyn
Copy link
Copy Markdown
Contributor Author

apolcyn commented Dec 9, 2021

artifact/distrib failures are ruby CBF tracked in b/209603283

@apolcyn apolcyn merged commit 0fa0e5f into grpc:master Dec 9, 2021
@copybara-service copybara-service bot added the imported Specifies if the PR has been imported to the internal repository label Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bloat/improvement imported Specifies if the PR has been imported to the internal repository lang/core perf-change/medium 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.

2 participants