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

Deadlock - Ensure resumed flight tasks are still fetched #5426

Merged
merged 1 commit into from Oct 22, 2021

Conversation

fjetter
Copy link
Member

@fjetter fjetter commented Oct 14, 2021

This is another deadlock introduced by #5160. In a nutshell, all tasks entering gather_deps must be handled / transitioned out of flight even though we're not trying to fetch all of the keys.

A second problem popping up is that the TaskState.done was not properly (re-)set causing dependencies to be fetched to be transitioned falsely.

This also closes #5406

Follow up PR to establish an enum as the worker task state name: #5444

@fjetter fjetter force-pushed the deadlock_resumed_flight branch 4 times, most recently from c7e6e8b to de1bcd9 Compare October 20, 2021 12:37
@fjetter
Copy link
Member Author

fjetter commented Oct 20, 2021

FWIW the power user who originally reported this issue tried this PR and it looks promising to not deadlock any longer.

Copy link
Collaborator

@crusaderky crusaderky left a comment

Choose a reason for hiding this comment

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

cosmetic tweaks

distributed/worker.py Outdated Show resolved Hide resolved
distributed/worker.py Outdated Show resolved Hide resolved
distributed/worker.py Outdated Show resolved Hide resolved
distributed/worker.py Outdated Show resolved Hide resolved
distributed/worker.py Outdated Show resolved Hide resolved
distributed/worker.py Outdated Show resolved Hide resolved
distributed/worker.py Outdated Show resolved Hide resolved
distributed/worker.py Outdated Show resolved Hide resolved
@fjetter
Copy link
Member Author

fjetter commented Oct 21, 2021

I see distributed/tests/test_steal.py::test_reschedule_concurrent_requests_deadlock still timing out, e.g. https://github.com/dask/distributed/pull/5444/checks?check_run_id=3953535224

couldn't reproduce, yet

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Thanks @fjetter

@jrbourbeau jrbourbeau merged commit 1670cf8 into dask:main Oct 22, 2021
zanieb pushed a commit to zanieb/distributed that referenced this pull request Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New tests for gather_dep are flaky
3 participants