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
2022-09-23 19:01:53,760 - distributed.protocol.core - CRITICAL - Failed to deserialize
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/distributed/protocol/core.py", line 158, in loadsreturn msgpack.loads(
File "msgpack/_unpacker.pyx", line 194, in msgpack._cmsgpack.unpackb
File "/usr/local/lib/python3.9/site-packages/distributed/protocol/core.py", line 138, in _decode_defaultreturn merge_and_deserialize(
File "/usr/local/lib/python3.9/site-packages/distributed/protocol/serialize.py", line 497, in merge_and_deserializereturn deserialize(header, merged_frames, deserializers=deserializers)
File "/usr/local/lib/python3.9/site-packages/distributed/protocol/serialize.py", line 426, in deserializereturn loads(header, frames)
File "/usr/local/lib/python3.9/site-packages/distributed/protocol/serialize.py", line 58, in dask_loads
loads = dask_deserialize.dispatch(typ)
File "/usr/local/lib/python3.9/site-packages/dask/utils.py", line 632, in dispatchraiseTypeError(f"No dispatch for {cls}")
TypeError: No dispatch for <class 'numpy.ndarray'>
AFAICT, NumPy was installed on the worker. There are plenty of other NumPy keys in memory on the same worker. So I'm not sure why this happened.
Unfortunately, I don't have more information here. Not sure how easily reproducible it is.
I think it's likely that that's it. Thanks for the link!
Basically, sounds like our serialization registry isn't threadsafe. But we deserialize in threads. Though we do use a threadpool of size 1, we sometimes deserialize in the main thread if the data is small enough. So a large and small NumPy array arriving at the same time would be deserialized concurrently from two threads.
We use a LocalCluster with 16 workers and two threads each on a 32 vCPU VM because our process is I/O bound from the object store (and only scales with processes).
Just to comment that I have put a PR up at dask/dask#9544 that addresses the problem for me locally. It is a very rough draft, but I'd be interested to know if you think that general approach is worth pursuing.
Activity
jrbourbeau commentedon Sep 23, 2022
Just a shot in the dark, but maybe dask/dask#9181 is related?
gjoseph92 commentedon Sep 23, 2022
I think it's likely that that's it. Thanks for the link!
Basically, sounds like our serialization registry isn't threadsafe. But we deserialize in threads. Though we do use a threadpool of size 1, we sometimes deserialize in the main thread if the data is small enough. So a large and small NumPy array arriving at the same time would be deserialized concurrently from two threads.
tasansal commentedon Oct 4, 2022
We are having similar issues in our ETL pipeline. Here is a traceback.
It is hard to reproduce because it happens at a different time every run.
dask = 2022.9.2distributed = 2022.9.2numpy = 1.23.3We use a
LocalClusterwith 16 workers and two threads each on a 32 vCPU VM because our process is I/O bound from the object store (and only scales with processes).jrbourbeau commentedon Oct 4, 2022
Thanks @tasansal. I, or someone else around me, will look into this issue. It's been popping up in a few places.
quasiben commentedon Oct 4, 2022
cc @jakirkham
zklaus commentedon Oct 5, 2022
Just to comment that I have put a PR up at dask/dask#9544 that addresses the problem for me locally. It is a very rough draft, but I'd be interested to know if you think that general approach is worth pursuing.
jakirkham commentedon Oct 5, 2022
Could others here please try PR ( dask/dask#9545 ) and report back how that goes?