-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[core] fix potential dead lock #17396
Merged
Merged
Conversation
This file contains 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
scv119
force-pushed
the
fix-potential-deadlock
branch
from
July 28, 2021 08:35
1eab469
to
bb1cf3e
Compare
scv119
force-pushed
the
fix-potential-deadlock
branch
from
July 28, 2021 08:58
bb1cf3e
to
a27825d
Compare
ericl
approved these changes
Jul 28, 2021
Hmm the number of failing tests is suspicious, trigger a rerun? |
ericl
added
the
@author-action-required
The PR author is responsible for the next step. Remove tag to send back to the reviewer.
label
Jul 28, 2021
rkooo567
approved these changes
Jul 28, 2021
scv119
removed
the
@author-action-required
The PR author is responsible for the next step. Remove tag to send back to the reviewer.
label
Jul 29, 2021
@scv119 btw, we probably need to verify this before merging it? (how do we know this fixes the issue now? ) |
lets wait for
#17399 which should show the bug.
…On Wed, Jul 28, 2021 at 6:18 PM SangBin Cho ***@***.***> wrote:
@scv119 <https://github.com/scv119> btw, we probably need to verify this
before merging it? (how do we know this fixes the issue now? )
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17396 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGMMPDDRI2KFGJYJFET2ZDT2CT5JANCNFSM5BD2YESQ>
.
|
rkooo567
added
@author-action-required
The PR author is responsible for the next step. Remove tag to send back to the reviewer.
do-not-merge
Do not merge this PR!
labels
Jul 30, 2021
@rkooo567 maybe we can merge this as we it will take a while to consolidate the debug-asan test? I've done manual tests and verified the potential dead-lock crash fixed on my laptop. |
scv119
removed
@author-action-required
The PR author is responsible for the next step. Remove tag to send back to the reviewer.
do-not-merge
Do not merge this PR!
labels
Jul 30, 2021
SGTM. Btw Eric already merged it haha |
stephanie-wang
pushed a commit
to stephanie-wang/ray
that referenced
this pull request
Jul 31, 2021
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
absl complains there are potential deadlocks when running in debug mode.
after reading the stack it turns out we have following lock acquiring order:
CoreWorker::InternalHeartbeat
, we first acquire and hold lockCoreWorker.mutex_
, then we acquire and holdCoreWorkerDirectActorTaskSubmitter.mutex_
viaCoreWorkerDirectActorTaskSubmitter.SubmitTask
call.CoreWorkerDirectActorTaskSubmitter.PushActorTask
, we first acquire and hold lockCoreWorkerDirectActorTaskSubmitter.mutex_
, and then we holdCoreWorker.mutex_
throughTaskManager
'sretry_task_callback_
This leads to potential dead locks if those two call path happens in different threads. This PR fix it by releasing the lock before calling to
SubmitTask
inCoreWorker::InternalHeartbeat
Test Plan