Skip to content

Some test suite tests are slow because they are downloading model weights #389

@lundybernard

Description

@lundybernard

When running the test suite, if there are any issues which cause multiple tests to fail, pytest-xdist will deadlock and not report results until the process is killed.

Steps to Reproduce

Setup a slightly broken environment, missing FFMPEG works, and run pytest tests/test_cli.py

Note that the tests hang, cpu utilization goes to 0, but the python3 threads stick around.

Logs

Ctrl+C to kill the process reveals the deadlock:

  File "~/miniconda3/envs/zamba/lib/python3.13/site-packages/xdist/workermanage.py", line 117, in teardown_nodes
    self.group.terminate(self.EXIT_TIMEOUT)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "~/miniconda3/envs/zamba/lib/python3.13/site-packages/execnet/multi.py", line 237, in terminate
    safe_terminate(
    ~~~~~~~~~~~~~~^
        self.execmodel,
        ^^^^^^^^^^^^^^^
    ...<4 lines>...
        ],
        ^^
    )
    ^
  File "~/miniconda3/envs/zamba/lib/python3.13/site-packages/execnet/multi.py", line 348, in safe_terminate
    reply.get()
    ~~~~~~~~~^^
  File "~/miniconda3/envs/zamba/lib/python3.13/site-packages/execnet/gateway_base.py", line 327, in get
    self.waitfinish(timeout)
    ~~~~~~~~~~~~~~~^^^^^^^^^
  File "~/miniconda3/envs/zamba/lib/python3.13/site-packages/execnet/gateway_base.py", line 334, in waitfinish
    if not self._result_ready.wait(timeout):
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "~/miniconda3/envs/zamba/lib/python3.13/threading.py", line 659, in wait
    signaled = self._cond.wait(timeout)
  File "~/miniconda3/envs/zamba/lib/python3.13/threading.py", line 359, in wait
    waiter.acquire()
    ~~~~~~~~~~~~~~^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions