You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dask hangs instead of erroring when a task requests a resource unknown to workers #7170
diagnosticsenhancementImprove existing functionality or make things work bettergood second issueClearly described, educational, but less trivial than "good first issue".
Describe the issue:
If a task requires a resource that was not defined in the cluster, said task will hang indefinitely.
Minimal Complete Verifiable Example:
fromdask.distributedimportClientasDaskClientdask_client=DaskClient(processes=False)
fut=dask_client.submit(print, "3", resources={"GPU": 1})
print("Waiting for result")
fut.result()
Anything else we need to know?
I find this behavior poor and hard to debug. Wouldn't it be preferable if a warning was displayed or error was thrown? After all, it is possible to check whether or not said resource has been defined:
Thanks for your report. This is actually a tricky issue. We cannot simply raise an exception because there are very valid scenarios where workers with a given resource only join after the computation was submitted. Tasks are in the meantime in a "no-worker" state and are waiting. This will indeed look like a deadlock.
Not showing anything on the dashboard in this case is indeed confusing and concerning. This is something we should look into.
Even the graph view is not really helpful (particularly since it's off for large graphs)
diagnosticsenhancementImprove existing functionality or make things work bettergood second issueClearly described, educational, but less trivial than "good first issue".
Activity
fjetter commentedon Oct 21, 2022
Thanks for your report. This is actually a tricky issue. We cannot simply raise an exception because there are very valid scenarios where workers with a given resource only join after the computation was submitted. Tasks are in the meantime in a "no-worker" state and are waiting. This will indeed look like a deadlock.
Not showing anything on the dashboard in this case is indeed confusing and concerning. This is something we should look into.

Even the graph view is not really helpful (particularly since it's off for large graphs)
Details
fjetter commentedon Oct 21, 2022
See #7171 for a suggestion to improve the dashboard
CorentinJ commentedon Oct 21, 2022
What about a warning though? Would that still be problematic?
Thank you for the dashboard improvement