Skip to content

Flaky timeout in cudf-polars Ray worker setup #23292

Description

@TomAugspurger

We're seeing some timeouts while setting up a Ray engine for cudf-polars tests. The exact test varies, but the traceback looks like

___________________ ERROR at setup of test_decimal_aggs[ray] ___________________
[gw1] linux -- Python 3.14.6 /opt/conda/envs/test/bin/python
Traceback (most recent call last):
  File "/opt/conda/envs/test/lib/python3.14/site-packages/_pytest/runner.py", line 353, in from_call
    result: TResult | None = func()
                             ~~~~^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/_pytest/runner.py", line 245, in <lambda>
    lambda: runtest_hook(item=item, **kwds),
            ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/pluggy/_hooks.py", line 512, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/pluggy/_callers.py", line 167, in _multicall
    raise exception
  File "/opt/conda/envs/test/lib/python3.14/site-packages/pluggy/_callers.py", line 139, in _multicall
    teardown.throw(exception)
    ~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/_pytest/logging.py", line 843, in pytest_runtest_setup
    yield
  File "/opt/conda/envs/test/lib/python3.14/site-packages/pluggy/_callers.py", line 139, in _multicall
    teardown.throw(exception)
    ~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/_pytest/capture.py", line 895, in pytest_runtest_setup
    return (yield)
            ^^^^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/pluggy/_callers.py", line 121, in _multicall
    res = hook_impl.function(*args)
  File "/opt/conda/envs/test/lib/python3.14/site-packages/_pytest/runner.py", line 165, in pytest_runtest_setup
    item.session._setupstate.setup(item)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/_pytest/runner.py", line 523, in setup
    col.setup()
    ~~~~~~~~~^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/_pytest/python.py", line 1723, in setup
    self._request._fillfixtures()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/_pytest/fixtures.py", line 707, in _fillfixtures
    item.funcargs[argname] = self.getfixturevalue(argname)
                             ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/_pytest/fixtures.py", line 539, in getfixturevalue
    fixturedef = self._get_active_fixturedef(argname)
  File "/opt/conda/envs/test/lib/python3.14/site-packages/_pytest/fixtures.py", line 627, in _get_active_fixturedef
    fixturedef.execute(request=subrequest)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/_pytest/fixtures.py", line 1110, in execute
    result: FixtureValue = ihook.pytest_fixture_setup(
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~^
        fixturedef=self, request=request
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/pluggy/_hooks.py", line 512, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/pluggy/_callers.py", line 167, in _multicall
    raise exception
  File "/opt/conda/envs/test/lib/python3.14/site-packages/pluggy/_callers.py", line 139, in _multicall
    teardown.throw(exception)
    ~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/_pytest/setuponly.py", line 36, in pytest_fixture_setup
    return (yield)
            ^^^^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/pluggy/_callers.py", line 121, in _multicall
    res = hook_impl.function(*args)
  File "/opt/conda/envs/test/lib/python3.14/site-packages/_pytest/fixtures.py", line 1202, in pytest_fixture_setup
    result = call_fixture_func(fixturefunc, request, kwargs)
  File "/opt/conda/envs/test/lib/python3.14/site-packages/_pytest/fixtures.py", line 908, in call_fixture_func
    fixture_result = next(generator)
  File "/__w/cudf/cudf/python/cudf_polars/tests/conftest.py", line 156, in _unconfigured_engine
    engine = RayEngine(
        num_ranks=ray_num_ranks,
        engine_options={"allow_gpu_sharing": True},
        ray_init_options=ray_init_options,
    )
  File "/__w/cudf/cudf/python/cudf_polars/cudf_polars/engine/ray.py", line 706, in __init__
    root_ucxx_address_as_bytes = ray.get(rank_actors[0].setup_root.remote())
  File "/opt/conda/envs/test/lib/python3.14/site-packages/ray/_private/auto_init_hook.py", line 22, in auto_init_wrapper
    return fn(*args, **kwargs)
  File "/opt/conda/envs/test/lib/python3.14/site-packages/ray/_private/client_mode_hook.py", line 107, in wrapper
    return func(*args, **kwargs)
  File "/opt/conda/envs/test/lib/python3.14/site-packages/ray/_private/worker.py", line 2980, in get
    values, debugger_breakpoint = worker.get_objects(
                                  ~~~~~~~~~~~~~~~~~~^
        object_refs, timeout, use_object_store=_use_object_store
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/ray/_private/worker.py", line 993, in get_objects
    ] = self.core_worker.get_objects(
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        object_refs,
        ^^^^^^^^^^^^
        timeout_ms,
        ^^^^^^^^^^^
    )
    ^
  File "python/ray/_raylet.pyx", line 3014, in ray._raylet.CoreWorker.get_objects
  File "python/ray/_raylet.pyx", line 352, in ray._raylet.RayObjectsToSerializedRayObjects
  File "<string>", line 1, in <lambda>
  File "/opt/conda/envs/test/lib/python3.14/site-packages/pytest_timeout.py", line 317, in handler
    timeout_sigalrm(item, settings)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/pytest_timeout.py", line 502, in timeout_sigalrm
    pytest.fail(PYTEST_FAILURE_MESSAGE % settings.timeout)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/test/lib/python3.14/site-packages/_pytest/outcomes.py", line 163, in __call__
    raise Failed(msg=reason, pytrace=pytrace)
Failed: Timeout (>45.0s) from pytest-timeout.
---------------------------- Captured stdout setup -----------------------------
+++++++++++++++++++++++++++++++++++ Timeout ++++++++++++++++++++++++++++++++++++
~~~~~~~~~~~~~~~~~~ Stack of ray_print_logs (134722940278336) ~~~~~~~~~~~~~~~~~~~
  File "/opt/conda/envs/test/lib/python3.14/threading.py", line 1044, in _bootstrap
    self._bootstrap_inner()
  File "/opt/conda/envs/test/lib/python3.14/threading.py", line 1082, in _bootstrap_inner
    self._context.run(self.run)
  File "/opt/conda/envs/test/lib/python3.14/threading.py", line 1024, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/envs/test/lib/python3.14/site-packages/ray/_private/worker.py", line 1061, in print_logs
    data = subscriber.poll()
~~~~~~~~~~~~~ Stack of ray_listen_error_messages (134722948671040) ~~~~~~~~~~~~~
  File "/opt/conda/envs/test/lib/python3.14/threading.py", line 1044, in _bootstrap
    self._bootstrap_inner()
  File "/opt/conda/envs/test/lib/python3.14/threading.py", line 1082, in _bootstrap_inner
    self._context.run(self.run)
  File "/opt/conda/envs/test/lib/python3.14/threading.py", line 1024, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/envs/test/lib/python3.14/site-packages/ray/_private/worker.py", line 2452, in listen_error_messages
    _, error_data = worker.gcs_error_subscriber.poll()
~~~~~~~~~~~~~~~~~~ Stack of PythonGCThread (134722965456448) ~~~~~~~~~~~~~~~~~~~
  File "/opt/conda/envs/test/lib/python3.14/threading.py", line 1044, in _bootstrap
    self._bootstrap_inner()
  File "/opt/conda/envs/test/lib/python3.14/threading.py", line 1082, in _bootstrap_inner
    self._context.run(self.run)
  File "/opt/conda/envs/test/lib/python3.14/site-packages/ray/_private/gc_collect_manager.py", line 29, in run
    self._gc_event.wait()
  File "/opt/conda/envs/test/lib/python3.14/threading.py", line 670, in wait
    signaled = self._cond.wait(timeout)
  File "/opt/conda/envs/test/lib/python3.14/threading.py", line 369, in wait
    waiter.acquire()
~~~~~~~~~~~~~~~~~~~~~ Stack of <unknown> (134740844639808) ~~~~~~~~~~~~~~~~~~~~~
  File "/opt/conda/envs/test/lib/python3.14/site-packages/execnet/gateway_base.py", line 411, in _perform_spawn
    reply.run()
  File "/opt/conda/envs/test/lib/python3.14/site-packages/execnet/gateway_base.py", line 341, in run
    self._result = func(*args, **kwargs)
  File "/opt/conda/envs/test/lib/python3.14/site-packages/execnet/gateway_base.py", line 1160, in _thread_receiver
    msg = Message.from_io(io)
  File "/opt/conda/envs/test/lib/python3.14/site-packages/execnet/gateway_base.py", line 567, in from_io
    header = io.read(9)  # type 1, channel 4, payload 4
  File "/opt/conda/envs/test/lib/python3.14/site-packages/execnet/gateway_base.py", line 534, in read
    data = self._read(numbytes - len(buf))

Observations:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcudf-polarsIssues specific to cudf-polars

    Type

    No type

    Projects

    Status
    Todo
    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions