dask / dask/distributed

closing a cluster with adaptive turned on logs asyncio error messages

Open
#4,427 2 comments 0 reactions 0 assignees View on GitHub
adaptive bug
Dominant language
Python
Stars
1.7k
Forks
778
Avg merge
2h 50m
Merged PRs (30d)
3

Description

**What happened**:

Running a simple adapt LocalCluster logged the following errors on termination of the cluster

```
DEBUG:asyncio:Using selector: KqueueSelector
DEBUG:asyncio:Using selector: KqueueSelector
DEBUG:asyncio:Using selector: KqueueSelector
ERROR:asyncio:Task was destroyed but it is pending!
task: wait_for=()]> cb=[IOLoop.add_future..() at /Users/mvanniekerk/miniconda3/envs/blockscorepy38/lib/python3.8/site-packages/tornado/ioloop.py:688]>
```

**What you expected to happen**:

This not to happen?

**Minimal Complete Verifiable Example**:

```python
import distributed
import logging
logging.basicConfig(level=logging.DEBUG)

n_workers = 4

def run():
with distributed.LocalCluster(n_workers=1, threads_per_worker=1) as cluster:
adapt = cluster.adapt(minimum=1, maximum=n_workers)
try:
with distributed.Client(cluster) as client:
pass
finally:
pass
# adapt.stop()

if __name__ == '__main__':
run()
```

**Anything else we need to know?**:

If `adapt.stop()` is called this doesn't happen

**Environment**:

- Dask version: 2020.12.0
- Python version: 3.8
- Operating System: osx-64
- Install method (conda, pip, source): conda

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.