Exception in thread and deadlock after creating Client
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 778
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 3
Description
**What happened**:
I am trying to instantiate and use a Client as part of handling an http request.
I see the following on the logs:
```
2020-09-24 00:24:37.955 PDT
distributed.comm.tcp - DEBUG - Setting TCP keepalive: nprobes=10, idle=30, interval=7
2020-09-24 00:24:37.955 PDT
distributed.comm.tcp - DEBUG - Setting TCP user timeout: 100000 ms
2020-09-24 00:24:37.959 PDT
distributed.comm.tcp - DEBUG - Setting TCP keepalive: nprobes=10, idle=30, interval=7
2020-09-24 00:24:37.960 PDT
distributed.comm.tcp - DEBUG - Setting TCP user timeout: 100000 ms
2020-09-24 00:24:37.968 PDT
[c11e9743e076e8d339f5e62f7dd16dc2] established connection to dask cluster:
2020-09-24 00:24:38.095 PDT
Exception in thread Thread-19:
2020-09-24 00:24:38.095 PDT
Traceback (most recent call last): File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/usr/local/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.7/asyncio/base_events.py", line 528, in run_forever 'Cannot run the event loop while another loop is running') RuntimeError: Cannot run the event loop while another loop is running
```
**What you expected to happen**:
I was hoping that the client would start normally, and I could use it, but instead the request hangs forever.
**Minimal Complete Verifiable Example**:
It is hard to come up with a minimal way to reproduce the problem. The issue might have something to do with other threads in the web server. The problem from dask's point of view is that instead of failing more directly it emits the exception traceback (from a thread) and then blocks forever.
**Anything else we need to know?**:
If you all can think of ways in which I could debug this issue they would be much appreciated.
**Environment**:
- Dask version: 2.27.0
- Python version: 3.7
- Operating System: linux
- Install method (conda, pip, source): pip
Contributor guide
Assessment
This issue has not been assessed yet.