Skip to content

RuntimeError when using the latest uvloop #57992

@tjkemp

Description

@tjkemp

Description

Ray fails with a RuntimeError when using the latest uvloop version.

Expected Behavior

The script should execute successfully without any RuntimeError.
The same example works with earlier uvloop versions (uvloop==0.21.0).

Observed Behavior

The script fails with:

RuntimeError: There is no current event loop in thread 'MainThread'.

Notes

Versions / Dependencies

ray==2.50.1
vllm==0.11.1rc2
uvloop==0.22.1

Reproduction script

  1. Start a Docker container, for example rocm/vllm:rocm6.4.1_vllm_0.10.1_20250909
  2. Install the latest uvloop: pip install uvloop==0.22.1
  3. Download and run the Ray LLM example: curl -O https://raw.githubusercontent.com/ray-project/ray/9746a94393de8cf331e1906541a1df002072dad2/doc/source/data/doc_code/working-with-llms/basic_llm_example.py
  4. Run the example: python basic_llm_example.py

Issue Severity

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Issue that should be fixed within a few weeksbugSomething that is supposed to be working; but isn'tcommunity-backlogcoreIssues that should be addressed in Ray Corestability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions