-
-
Notifications
You must be signed in to change notification settings - Fork 721
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
Error closing a local cluster when client still running #6087
Comments
at python interpreter finalization:
The reason this worked before is that our ExecutorResolver used our legacy copy of ThreadPoolExecutor which uses atexit instead of threading._register_atexit: distributed/distributed/_concurrent_futures_thread.py Lines 40 to 50 in 6e30766
A fix for this would be to ensure that clients then workers then clusters get shutdown atexit |
I'm running into all sorts of problems regarding future/task scheduling and cancellation and blocking threadpools lately. Here are a couple of references but I can't tell you if any are actually related
|
We should probably block release on this, yes? cc @jrbourbeau @graingert is this something that you have time to own? (this seems like the sort of thing that you know best among the team) |
Here is a possible solution: #6120 |
Hi, I'm still having the same issue with the following configuration:
Reproducer from dask.distributed import LocalCluster, Client
if __name__ == '__main__':
cluster = LocalCluster(n_workers=1, threads_per_worker=1, processes=True)
cluster.close() Admittedly, the original reproducer didn't manually |
Is the context manager the only way round here? |
What happened:
When a local cluster (using processes) shuts down, a ton of errors are now spewed about scheduling new futures after shutdown.
I can't replicate it in my distributed dev environment, but in a different environment (which is quite similar, also running dask & distributed from main—just py py3.9.1 instead of py3.9.5?) the process hangs and never terminates until a ctrl-C. In my distributed dev environment, the same errors are spewed, but it exits (with code 0 no the less).
git bisect
implicates #6031 @graingert.Minimal Complete Verifiable Example:
Environment:
The text was updated successfully, but these errors were encountered: