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
{{ message }}
Repository navigation
CI failures with AssertionError: Regex pattern did not match. #9140
In #9139 I see a lot of CI failures all with the error AssertionError: Regex pattern did not match., not the same test every time though.
FAILED distributed/tests/test_scheduler.py::test_restart_nanny_timeout_exceeded - AssertionError: Regex pattern did not match.
Regex: '2/2 nanny worker\\(s\\) did not shut down within 1s'
Input: '[Errno None] None'
FAILED distributed/tests/test_scheduler.py::test_restart_not_all_workers_return - AssertionError: Regex pattern did not match.
Regex: 'Waited for 2 worker'
Input: '[Errno None] None'
FAILED distributed/tests/test_scheduler.py::test_restart_some_nannies_some_not - AssertionError: Regex pattern did not match.
Regex: 'The 1 worker\\(s\\) not using Nannies'
Input: '[Errno None] None'
The last commit to main was the 2025.11.0 release. It looks like these errors happened but only for the macOS Python 3.12 runs. However in #9141 it's happening reasonably consistently across all operating systems and Python versions.
The assertion failure is very consistent, it happens when a TimeoutError is raised when restarting workers. All of the tests are failing to match an error message.
It looks like the exception is being raised, but when comparing the regex isn't matching due to the message being set to None.
Traceback (most recent call last):
File "/Users/jtomlinson/Projects/dask/distributed/distributed/tests/test_scheduler.py", line 1162, in test_restart_not_all_workers_returnawait c.restart(timeout="1s")
File "/Users/jtomlinson/Projects/dask/distributed/distributed/client.py", line 3824, in _restartawaitself.scheduler.restart(
...<3 lines>...
)
File "/Users/jtomlinson/Projects/dask/distributed/distributed/core.py", line 1259, in send_recv_from_rpcreturnawait send_recv(comm=comm, op=key, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/core.py", line 1043, in send_recvraise exc.with_traceback(tb)
File "/Users/jtomlinson/Projects/dask/distributed/distributed/core.py", line 834, in _handle_comm
result =await result
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils.py", line 825, in wrapperreturnawait func(*args, **kwargs)
^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/scheduler.py", line 6526, in restartawaitself.restart_workers(
^^^^^^^^^^^^^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils.py", line 825, in wrapperreturnawait func(*args, **kwargs)
^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/scheduler.py", line 6710, in restart_workersraiseTimeoutError(msg)
^^^^^^^^^^^TimeoutError: [Errno None] None
Running the test locally I can clearly see the exception being raised with the correct message which should match the regex, but by the time it gets to the test the message is wrong.
Exception logged to stderr
TimeoutError: Waited for 2 worker(s) to reconnect after restarting but, after 1s, 2 have not returned. Consider a longer timeout, or `wait_for_workers=False`. The 2 worker(s) not using Nannies were just shut down instead of restarted (restart is only possible with Nannies). If your deployment system does not automatically re-launch terminated processes, then those workers will never come back, and `Client.restart` will always time out. Do not use `Client.restart` in that case.
Test output
AssertionError: Regex pattern did not match.
Regex: 'Waited for 2 worker'
Input: '[Errno None] None'
Full test output
pytest -s --tb=native --runslow distributed/tests/test_scheduler.py::test_restart_not_all_workers_return
============================================================ test session starts =============================================================
platform darwin -- Python 3.13.9, pytest-8.4.2, pluggy-1.6.0 -- /Users/jtomlinson/miniconda3/envs/dask/bin/python3.13
cachedir: .pytest_cache
hypothesis profile 'default'
rootdir: /Users/jtomlinson/Projects/dask/distributedconfigfile: pyproject.tomlplugins: mock-3.15.1, hypothesis-6.147.0, xdist-3.8.0, timeout-2.4.0, rerunfailures-16.1, cov-7.0.0timeout: 300.0s
timeout method: thread
timeout func_only: False
collected 1 item
distributed/tests/test_scheduler.py::test_restart_not_all_workers_return 2025-11-11 17:11:14,335 - distributed.http.proxy - INFO - To route to workers diagnostics web server please install jupyter-server-proxy: python -m pip install jupyter-server-proxy
2025-11-11 17:11:14,339 - distributed.scheduler - INFO - State start
2025-11-11 17:11:14,345 - distributed.scheduler - INFO - Scheduler at: tcp://127.0.0.1:59121
2025-11-11 17:11:14,345 - distributed.scheduler - INFO - dashboard at: http://127.0.0.1:59120/status
2025-11-11 17:11:14,345 - distributed.scheduler - INFO - Registering Worker plugin shuffle
2025-11-11 17:11:14,361 - distributed.worker - INFO - Start worker at: tcp://127.0.0.1:59122
2025-11-11 17:11:14,361 - distributed.worker - INFO - Listening to: tcp://127.0.0.1:59122
2025-11-11 17:11:14,361 - distributed.worker - INFO - Worker name: 0
2025-11-11 17:11:14,361 - distributed.worker - INFO - dashboard at: 127.0.0.1:59123
2025-11-11 17:11:14,361 - distributed.worker - INFO - Waiting to connect to: tcp://127.0.0.1:59121
2025-11-11 17:11:14,362 - distributed.worker - INFO - -------------------------------------------------
2025-11-11 17:11:14,362 - distributed.worker - INFO - Threads: 1
2025-11-11 17:11:14,362 - distributed.worker - INFO - Memory: 36.00 GiB
2025-11-11 17:11:14,362 - distributed.worker - INFO - Local Directory: /var/folders/xw/bnx6v3313s5gh8bnx5wz806r0000gp/T/dask-scratch-space/worker-pv2sco4h
2025-11-11 17:11:14,362 - distributed.worker - INFO - -------------------------------------------------
2025-11-11 17:11:14,362 - distributed.worker - INFO - Start worker at: tcp://127.0.0.1:59125
2025-11-11 17:11:14,362 - distributed.worker - INFO - Listening to: tcp://127.0.0.1:59125
2025-11-11 17:11:14,362 - distributed.worker - INFO - Worker name: 1
2025-11-11 17:11:14,362 - distributed.worker - INFO - dashboard at: 127.0.0.1:59126
2025-11-11 17:11:14,362 - distributed.worker - INFO - Waiting to connect to: tcp://127.0.0.1:59121
2025-11-11 17:11:14,362 - distributed.worker - INFO - -------------------------------------------------
2025-11-11 17:11:14,362 - distributed.worker - INFO - Threads: 1
2025-11-11 17:11:14,362 - distributed.worker - INFO - Memory: 36.00 GiB
2025-11-11 17:11:14,362 - distributed.worker - INFO - Local Directory: /var/folders/xw/bnx6v3313s5gh8bnx5wz806r0000gp/T/dask-scratch-space/worker-_l8m2ks4
2025-11-11 17:11:14,362 - distributed.worker - INFO - -------------------------------------------------
2025-11-11 17:11:14,388 - distributed.scheduler - INFO - Register worker addr: tcp://127.0.0.1:59122 name: 0
2025-11-11 17:11:14,388 - distributed.scheduler - INFO - Starting worker compute stream, tcp://127.0.0.1:59122
2025-11-11 17:11:14,388 - distributed.core - INFO - Starting established connection to tcp://127.0.0.1:59124
2025-11-11 17:11:14,389 - distributed.scheduler - INFO - Register worker addr: tcp://127.0.0.1:59125 name: 1
2025-11-11 17:11:14,389 - distributed.scheduler - INFO - Starting worker compute stream, tcp://127.0.0.1:59125
2025-11-11 17:11:14,389 - distributed.core - INFO - Starting established connection to tcp://127.0.0.1:59127
2025-11-11 17:11:14,389 - distributed.worker - INFO - Starting Worker plugin shuffle
2025-11-11 17:11:14,389 - distributed.worker - INFO - Registered to: tcp://127.0.0.1:59121
2025-11-11 17:11:14,389 - distributed.worker - INFO - -------------------------------------------------
2025-11-11 17:11:14,390 - distributed.worker - INFO - Starting Worker plugin shuffle
2025-11-11 17:11:14,390 - distributed.core - INFO - Starting established connection to tcp://127.0.0.1:59121
2025-11-11 17:11:14,390 - distributed.worker - INFO - Registered to: tcp://127.0.0.1:59121
2025-11-11 17:11:14,390 - distributed.worker - INFO - -------------------------------------------------
2025-11-11 17:11:14,390 - distributed.core - INFO - Starting established connection to tcp://127.0.0.1:59121
2025-11-11 17:11:14,420 - distributed.scheduler - INFO - Receive client connection: Client-6db6f234-bf21-11f0-a9ea-b4e9b8685d00
2025-11-11 17:11:14,420 - distributed.core - INFO - Starting established connection to tcp://127.0.0.1:59128
2025-11-11 17:11:14,421 - distributed.scheduler - INFO - Restarting workers and releasing all keys (stimulus_id='client-restart-1762881074.4214919')
2025-11-11 17:11:14,421 - distributed.scheduler - INFO - Restarting all workers (stimulus_id='client-restart-1762881074.4214919'
2025-11-11 17:11:14,421 - distributed.scheduler - WARNING - Workers ['tcp://127.0.0.1:59122', 'tcp://127.0.0.1:59125'] do not use a nanny and will be terminated without restarting them
2025-11-11 17:11:14,421 - distributed.scheduler - INFO - Remove worker addr: tcp://127.0.0.1:59122 name: 0 (stimulus_id='client-restart-1762881074.4214919')
2025-11-11 17:11:14,422 - distributed.scheduler - INFO - Remove worker addr: tcp://127.0.0.1:59125 name: 1 (stimulus_id='client-restart-1762881074.4214919')
2025-11-11 17:11:14,422 - distributed.scheduler - INFO - Lost all workers
2025-11-11 17:11:14,422 - distributed.worker - INFO - Stopping worker at tcp://127.0.0.1:59122. Reason: scheduler-remove-worker
2025-11-11 17:11:14,422 - distributed.worker - INFO - Stopping worker at tcp://127.0.0.1:59125. Reason: scheduler-remove-worker
2025-11-11 17:11:14,422 - distributed.worker - INFO - Removing Worker plugin shuffle
2025-11-11 17:11:14,422 - distributed.worker - INFO - Removing Worker plugin shuffle
2025-11-11 17:11:14,424 - distributed.core - INFO - Received 'close-stream' from tcp://127.0.0.1:59124; closing.
2025-11-11 17:11:14,424 - distributed.core - INFO - Received 'close-stream' from tcp://127.0.0.1:59127; closing.
2025-11-11 17:11:14,429 - distributed.core - INFO - Connection to tcp://127.0.0.1:59121 has been closed.
2025-11-11 17:11:14,433 - distributed.core - INFO - Connection to tcp://127.0.0.1:59121 has been closed.
2025-11-11 17:11:15,460 - distributed.scheduler - ERROR - Waited for 2 worker(s) to reconnect after restarting but, after 1s, 2 have not returned. Consider a longer timeout, or `wait_for_workers=False`. The 2 worker(s) not using Nannies were just shut down instead of restarted (restart is only possible with Nannies). If your deployment system does not automatically re-launch terminated processes, then those workers will never come back, and `Client.restart` will always time out. Do not use `Client.restart` in that case.
Traceback (most recent call last):
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils.py", line 825, in wrapperreturnawait func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/scheduler.py", line 6709, in restart_workersraiseTimeoutError(msg)
TimeoutError: Waited for 2 worker(s) to reconnect after restarting but, after 1s, 2 have not returned. Consider a longer timeout, or `wait_for_workers=False`. The 2 worker(s) not using Nannies were just shut down instead of restarted (restart is only possible with Nannies). If your deployment system does not automatically re-launch terminated processes, then those workers will never come back, and `Client.restart` will always time out. Do not use `Client.restart` in that case.
2025-11-11 17:11:15,463 - distributed.scheduler - ERROR - Waited for 2 worker(s) to reconnect after restarting but, after 1s, 2 have not returned. Consider a longer timeout, or `wait_for_workers=False`. The 2 worker(s) not using Nannies were just shut down instead of restarted (restart is only possible with Nannies). If your deployment system does not automatically re-launch terminated processes, then those workers will never come back, and `Client.restart` will always time out. Do not use `Client.restart` in that case.
Traceback (most recent call last):
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils.py", line 825, in wrapperreturnawait func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/scheduler.py", line 6526, in restartawaitself.restart_workers(
...<4 lines>...
)
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils.py", line 825, in wrapperreturnawait func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/scheduler.py", line 6709, in restart_workersraiseTimeoutError(msg)
TimeoutError: Waited for 2 worker(s) to reconnect after restarting but, after 1s, 2 have not returned. Consider a longer timeout, or `wait_for_workers=False`. The 2 worker(s) not using Nannies were just shut down instead of restarted (restart is only possible with Nannies). If your deployment system does not automatically re-launch terminated processes, then those workers will never come back, and `Client.restart` will always time out. Do not use `Client.restart` in that case.
2025-11-11 17:11:15,464 - distributed.core - ERROR - Exception while handling op restart
Traceback (most recent call last):
File "/Users/jtomlinson/Projects/dask/distributed/distributed/core.py", line 834, in _handle_comm
result =await result
^^^^^^^^^^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils.py", line 825, in wrapperreturnawait func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/scheduler.py", line 6526, in restartawaitself.restart_workers(
...<4 lines>...
)
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils.py", line 825, in wrapperreturnawait func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/scheduler.py", line 6709, in restart_workersraiseTimeoutError(msg)
TimeoutError: Waited for 2 worker(s) to reconnect after restarting but, after 1s, 2 have not returned. Consider a longer timeout, or `wait_for_workers=False`. The 2 worker(s) not using Nannies were just shut down instead of restarted (restart is only possible with Nannies). If your deployment system does not automatically re-launch terminated processes, then those workers will never come back, and `Client.restart` will always time out. Do not use `Client.restart` in that case.
2025-11-11 17:11:15,509 - distributed.scheduler - INFO - Remove client Client-6db6f234-bf21-11f0-a9ea-b4e9b8685d00
2025-11-11 17:11:15,509 - distributed.core - INFO - Received 'close-stream' from tcp://127.0.0.1:59128; closing.
2025-11-11 17:11:15,509 - distributed.scheduler - INFO - Remove client Client-6db6f234-bf21-11f0-a9ea-b4e9b8685d00
2025-11-11 17:11:15,509 - distributed.scheduler - INFO - Close client connection: Client-6db6f234-bf21-11f0-a9ea-b4e9b8685d00
2025-11-11 17:11:15,510 - distributed.scheduler - INFO - Closing scheduler. Reason: unknown
2025-11-11 17:11:15,510 - distributed.scheduler - INFO - Scheduler closing all comms
FAILED
================================================================== FAILURES ==================================================================
____________________________________________________ test_restart_not_all_workers_return _____________________________________________________
Traceback (most recent call last):
File "/Users/jtomlinson/Projects/dask/distributed/distributed/tests/test_scheduler.py", line 1162, in test_restart_not_all_workers_returnawait c.restart(timeout="1s")
File "/Users/jtomlinson/Projects/dask/distributed/distributed/client.py", line 3824, in _restartawaitself.scheduler.restart(
...<3 lines>...
)
File "/Users/jtomlinson/Projects/dask/distributed/distributed/core.py", line 1259, in send_recv_from_rpcreturnawait send_recv(comm=comm, op=key, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/core.py", line 1043, in send_recvraise exc.with_traceback(tb)
File "/Users/jtomlinson/Projects/dask/distributed/distributed/core.py", line 834, in _handle_comm
result =await result
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils.py", line 825, in wrapperreturnawait func(*args, **kwargs)
^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/scheduler.py", line 6526, in restartawaitself.restart_workers(
^^^^^^^^^^^^^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils.py", line 825, in wrapperreturnawait func(*args, **kwargs)
^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/scheduler.py", line 6709, in restart_workersraiseTimeoutError(msg)
^^^^^^^^^^^TimeoutError: [Errno None] None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/_pytest/runner.py", line 344, in from_call
result: TResult |None= func()
~~~~^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/_pytest/runner.py", line 246, in <lambda>lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_hooks.py", line 512, in __call__returnself._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexecreturnself._inner_hookexec(hook_name, methods, kwargs, firstresult)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_callers.py", line 167, in _multicallraise exception
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_callers.py", line 139, in _multicall
teardown.throw(exception)
~~~~~~~~~~~~~~^^^^^^^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/_pytest/logging.py", line 850, in pytest_runtest_callyield
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_callers.py", line 139, in _multicall
teardown.throw(exception)
~~~~~~~~~~~~~~^^^^^^^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/_pytest/capture.py", line 900, in pytest_runtest_callreturn (yield)
^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_callers.py", line 139, in _multicall
teardown.throw(exception)
~~~~~~~~~~~~~~^^^^^^^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_callers.py", line 53, in run_old_style_hookwrapperreturn result.get_result()
~~~~~~~~~~~~~~~~~^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_result.py", line 103, in get_resultraise exc.with_traceback(tb)
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_callers.py", line 38, in run_old_style_hookwrapper
res =yield^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_callers.py", line 139, in _multicall
teardown.throw(exception)
~~~~~~~~~~~~~~^^^^^^^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_callers.py", line 53, in run_old_style_hookwrapperreturn result.get_result()
~~~~~~~~~~~~~~~~~^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_result.py", line 103, in get_resultraise exc.with_traceback(tb)
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_callers.py", line 38, in run_old_style_hookwrapper
res =yield^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_callers.py", line 139, in _multicall
teardown.throw(exception)
~~~~~~~~~~~~~~^^^^^^^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/_pytest/skipping.py", line 263, in pytest_runtest_callreturn (yield)
^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_callers.py", line 121, in _multicall
res = hook_impl.function(*args)
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/_pytest/runner.py", line 178, in pytest_runtest_call
item.runtest()
~~~~~~~~~~~~^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/_pytest/python.py", line 1671, in runtestself.ihook.pytest_pyfunc_call(pyfuncitem=self)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_hooks.py", line 512, in __call__returnself._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexecreturnself._inner_hookexec(hook_name, methods, kwargs, firstresult)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_callers.py", line 167, in _multicallraise exception
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/pluggy/_callers.py", line 121, in _multicall
res = hook_impl.function(*args)
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/_pytest/python.py", line 157, in pytest_pyfunc_call
result = testfunction(**testargs)
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/contextlib.py", line 85, in innerreturn func(*args, **kwds)
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/contextlib.py", line 85, in innerreturn func(*args, **kwds)
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils_test.py", line 1092, in test_funcreturn _run_and_close_tornado(async_fn_outer)
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils_test.py", line 380, in _run_and_close_tornadoreturn asyncio_run(inner_fn(), loop_factory=get_loop_factory())
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/asyncio/runners.py", line 195, in runreturn runner.run(main)
~~~~~~~~~~^^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/asyncio/runners.py", line 118, in runreturnself._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/asyncio/base_events.py", line 725, in run_until_completereturn future.result()
~~~~~~~~~~~~~^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils_test.py", line 377, in inner_fnreturnawait async_fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils_test.py", line 1089, in async_fn_outerreturnawait utils_wait_for(async_fn(), timeout=timeout *2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils.py", line 1930, in wait_forreturnawait fut
^^^^^^^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils_test.py", line 1021, in async_fn
result =await coro2
^^^^^^^^^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/utils.py", line 1930, in wait_forreturnawait fut
^^^^^^^^^
File "/Users/jtomlinson/Projects/dask/distributed/distributed/tests/test_scheduler.py", line 1161, in test_restart_not_all_workers_returnwith pytest.raises(TimeoutError, match="Waited for 2 worker"):
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jtomlinson/miniconda3/envs/dask/lib/python3.13/site-packages/_pytest/raises.py", line 721, in __exit__raiseAssertionError(self._fail_reason)
AssertionError: Regex pattern did not match.
Regex: 'Waited for 2 worker'
Input: '[Errno None] None'
============================================================ slowest 20 durations ============================================================
1.21s call distributed/tests/test_scheduler.py::test_restart_not_all_workers_return
(2 durations < 0.005s hidden. Use -vv to show these durations.)
========================================================== short test summary info ===========================================================
FAILED distributed/tests/test_scheduler.py::test_restart_not_all_workers_return - AssertionError: Regex pattern did not match.
============================================================= 1 failed in 2.11s ==============================================================
I can reproduce this as far back as dask/distributed 2023.1.0 (I could probably keep going but would need to downgrade things like numpy). So something else in the environment must've changed to cause this.
These two runs are testing the same distributed code, but one passes and the other fails. There are a few environment differences but downgrading tblib was the one that got things passing locally for me.
I've opened ionelmc/python-tblib#85 upstream to hopefully resolve this in tblib. In the meantime we could exclude 3.2.0 and 3.2.1 to get CI passing again.
ionelmc/python-tblib#85 has been merged and tblib==3.2.2 was released. I verified that the failing tests are passing again locally. Regardless of whether we choose to merge #9141 we can close this now.
Activity
Run CI to investigate dask#9140
jacobtomlinson commentedon Nov 11, 2025
The last commit to
mainwas the2025.11.0release. It looks like these errors happened but only for the macOS Python 3.12 runs. However in #9141 it's happening reasonably consistently across all operating systems and Python versions.jacobtomlinson commentedon Nov 11, 2025
I am able to reproduce this locally.
Local environment
The assertion failure is very consistent, it happens when a
TimeoutErroris raised when restarting workers. All of the tests are failing to match an error message.distributed/distributed/scheduler.py
Line 6709 in fde9e5f
It looks like the exception is being raised, but when comparing the regex isn't matching due to the message being set to
None.jacobtomlinson commentedon Nov 11, 2025
Running the test locally I can clearly see the exception being raised with the correct message which should match the regex, but by the time it gets to the test the message is wrong.
Exception logged to stderr
Test output
Full test output
jacobtomlinson commentedon Nov 11, 2025
I can reproduce this as far back as dask/distributed
2023.1.0(I could probably keep going but would need to downgrade things likenumpy). So something else in the environment must've changed to cause this.jacobtomlinson commentedon Nov 11, 2025
Downgrading
tblibto3.1.0resolves the issue.These two runs are testing the same
distributedcode, but one passes and the other fails. There are a few environment differences but downgradingtblibwas the one that got things passing locally for me.Passed on main - https://github.com/dask/distributed/actions/runs/19143357901/job/54714340720
Failed in CI - https://github.com/dask/distributed/actions/runs/19269845290/job/55094960448?pr=9141
jacobtomlinson commentedon Nov 12, 2025
I've opened ionelmc/python-tblib#85 upstream to hopefully resolve this in
tblib. In the meantime we could exclude3.2.0and3.2.1to get CI passing again.jacobtomlinson commentedon Nov 12, 2025
ionelmc/python-tblib#85 has been merged and
tblib==3.2.2was released. I verified that the failing tests are passing again locally. Regardless of whether we choose to merge #9141 we can close this now.