RecursionError after many consecutive additions
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 778
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 3
Description
Running the following code results in a `RecursionError`.
```python
import dask.array as da
from dask.distributed import Client
import numpy as np
if __name__ == "__main__":
client = Client()
x = da.zeros(1)
out = 0
n = 1000
for _ in range(n):
out += x
out.compute()
```
This is the output:
```
[...]
File "[...]/python3.10/site-packages/distributed/utils_comm.py", line 225, in unpack_remotedata
return tuple(unpack_remotedata(item, byte_keys, myset) for item in o)
File "[...]/python3.10/site-packages/distributed/utils_comm.py", line 225, in
return tuple(unpack_remotedata(item, byte_keys, myset) for item in o)
File "[...]/python3.10/site-packages/distributed/utils_comm.py", line 225, in unpack_remotedata
return tuple(unpack_remotedata(item, byte_keys, myset) for item in o)
File "[...]/python3.10/site-packages/distributed/utils_comm.py", line 225, in
return tuple(unpack_remotedata(item, byte_keys, myset) for item in o)
RecursionError: maximum recursion depth exceeded
```
I use dask from conda with Python 3.10.4 and the following dependency versions:
```
# Name Version Build Channel
dask 2022.7.0 py310h06a4308_0
dask-core 2022.7.0 py310h06a4308_0
dask-jobqueue 0.8.1 pyhd8ed1ab_0 conda-forge
distributed 2022.7.0 py310h06a4308_0
numpy 1.23.1 py310h1794996_0
```
Contributor guide
Assessment
This issue has not been assessed yet.