-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[Distributed] make finalizer messages threadsafe #42240
Conversation
Tentatively marking backport-1.7, given the issue this patch targets has been observed on 1.7 previously. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From CI, this hangs
Looks like this would be vulnerable to a lock priority inversion deadlock situation |
5f562fd
to
f8b7064
Compare
Would using a lock-free queue, stack, or "channel" for the messages help here? It sounds nice to not block and do minimal work inside a finalizer. (You can always |
Yeah that would be a good optimization, but I don't think we have that in base right now? But even with a lock-free queue, notifying the consumer is a problem. |
For a queue with notification, we can use a lock-free unbounded "channel" (aka dual queue). It's possible to implement lock-free(-ish) Footnotes
|
@KristofferC I would like to let this bake on master for a while before backporting. Should I remove the tag until a week or two from now? |
Sounds good. |
(cherry picked from commit eb1d6b3)
Is this backportable to 1.6? We are experiencing #42126 (with the old error type) there. |
(cherry picked from commit f3e4ef5)
Partial revert of #41722
Fixes #42126