Repository navigation
Avoid transitioning from memory/released to missing in worker #6123
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
Changes from all commits
93fa4dc
32f8177
7dffe7d
30a1194
2b2e5d2
d282a99
6d9011d
0e937b3
2b6f4a5
6847bb9
b153435
88a27c8
3df7749
7cf7901
caec654
7c50898
15768d4
ee8065a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2541,12 +2541,14 @@ def _transition( | |||||||||||||
| instructions += b_instructions | ||||||||||||||
| except InvalidTransition: | ||||||||||||||
| raise InvalidTransition( | ||||||||||||||
| f"Impossible transition from {start} to {finish} for {ts.key}" | ||||||||||||||
| ) from None | ||||||||||||||
| f"Impossible transition from {start} to {finish} for {ts.key}", | ||||||||||||||
| self.story(ts), | ||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
| else: | ||||||||||||||
| raise InvalidTransition( | ||||||||||||||
| f"Impossible transition from {start} to {finish} for {ts.key}" | ||||||||||||||
| f"Impossible transition from {start} to {finish} for {ts.key}", | ||||||||||||||
| self.story(ts), | ||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
| self.log.append( | ||||||||||||||
|
|
@@ -3044,7 +3046,7 @@ async def gather_dep( | |||||||||||||
| for d in has_what: | ||||||||||||||
| ts = self.tasks[d] | ||||||||||||||
| ts.who_has.remove(worker) | ||||||||||||||
| if not ts.who_has: | ||||||||||||||
| if not ts.who_has and ts.state not in ("released", "memory"): | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see the failure in https://github.com/dask/distributed/runs/6032728170?check_suite_focus=true assert all(
dep.key in self.data or dep.key in self.actors
for dep in ts.dependencies
)but I'm not following why relaxing this from If you'd be willing to add an
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I encourage you to understand it :)
I think that we should do this in another PR and get this in as it is. I'd like to resolve this deadlock and get out a release. |
||||||||||||||
| recommendations[ts] = "missing" | ||||||||||||||
| self.log.append( | ||||||||||||||
| ("missing-who-has", worker, ts.key, stimulus_id, time()) | ||||||||||||||
|
|
@@ -3089,7 +3091,10 @@ async def gather_dep( | |||||||||||||
| self.batched_stream.send( | ||||||||||||||
| {"op": "missing-data", "errant_worker": worker, "key": d} | ||||||||||||||
| ) | ||||||||||||||
| recommendations[ts] = "fetch" if ts.who_has else "missing" | ||||||||||||||
| if ts.who_has: | ||||||||||||||
| recommendations[ts] = "fetch" | ||||||||||||||
| elif ts.state not in ("released", "memory"): | ||||||||||||||
| recommendations[ts] = "missing" | ||||||||||||||
|
Comment on lines
+3094
to
+3097
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could the task be in memory or missing even if Guess I'm wondering why this isn't:
Suggested change
For that matter, could I feel like an passlist here (likely fetch/flight) still would make more sense. If some action has occurred in the meantime since
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm happy to make a change like what is above because it seems safe relative to what is here already. When I implemented the allowlist / passlist tests failed, so our reasoning here is not yet correct. I think that we should absolutely pursue this, but that we should handle that separately. I'd like to get this in for a release and I don't want to increase scope much beyond "avoid released/memory -> missing transitions". I totally get that we might want to do more eventually, but I don't think that we need to do more in order to do this.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Wait, no, it looks like that would exclude more paths. I'm really looking for a minimal set of changes that avoid the deadlock for right now. |
||||||||||||||
| del data, response | ||||||||||||||
| self.transitions(recommendations, stimulus_id=stimulus_id) | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
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.
What does this actually test? Every 4 seconds, all workers will shut down, losing all accrued progress, and will be start being restarted in chain by the nannies. Over time, timings will drift apart and reach a somewhat random distribution of restarts. It's close to impossible to reach z.status=="finished", as it would take way more than 4s to finish (it takes 13s without KillWorker on a speedy laptop). Because of the very high allowed_failures, status should never be failed. If the cluster deadlocks e.g. due to illegal transitions, the test won't notice.
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.
See #6134