Follow-up from #6371 and #6385. CC @gjoseph92 ``test_deadlock_cancelled_after_inflight_before_gather_from_worker`` removes a worker while another worker has a task in flight from it. The test calls https://github.com/dask/distributed/blob/9bb999d4b66670570d9d8f53d04501dec6a25e7e/distributed/tests/test_worker.py#L3282-L3284 which in turn calls https://github.com/dask/distributed/blob/9bb999d4b66670570d9d8f53d04501dec6a25e7e/distributed/scheduler.py#L4172-L4174 which in turrn calls https://github.com/dask/distributed/blob/9bb999d4b66670570d9d8f53d04501dec6a25e7e/distributed/worker.py#L1576 ### Expected result The RPC channel is explicitly shut down. The waiting gather_dep call on the other worker raises OSError within milliseconds. ### Actual result The RPC channel is left dangling until the TCP timeout kicks in (5s by default; in the test it's been shortened to 0.5s).
Activity