Skip to content

Env server fails to start on Windows: ZMQ ipc:// transport is unsupported #2030

Description

@martian56

What happens

Running an evaluation on native Windows (prime eval run ..., which spins up the
verifiers env server) fails before a single rollout runs. The env-server subprocess
can't bind its internal ZMQ sockets, and the client receive loop errors out too.

Two errors fire:

  1. Client receive loop:

    Proactor event loop does not implement add_reader family of methods required for
    zmq. zmq will work with proactor if tornado >= 6.1 can be found. Use
    asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy()) or install
    'tornado>=6.1' to avoid this error.

  2. Env server (fatal):

    zmq.error.ZMQError: Protocol not supported (addr='ipc:///tmp/vf-...-responses')

Root cause

verifiers/utils/serve_utils.py:

def make_ipc_address(session_id, name):
    return f"ipc:///tmp/vf-{session_id}-{name.replace('/', '--')}"

The router↔worker sockets use ZMQ ipc:// with a hardcoded /tmp path. ipc:// is
Unix-domain-socket only and isn't supported on Windows, so EnvRouter.__init__ fails at
bind(). There's no tcp fallback or override. Installing tornado only silences the
first Proactor error; the ipc:// bind still fails regardless of the event loop.

Impact

Anything that starts the env server — prime eval run, prime gepa, local prime rl
cannot run on native Windows. Env authoring, env install, and env push are unaffected.

Environment

  • OS: Windows 11
  • Python 3.12
  • verifiers 0.2.0 (same code on main)

Steps to reproduce

prime env init demo        # any trivial SingleTurnEnv
prime env install demo
prime eval run demo -m openai/gpt-4o-mini -p openrouter -n 1 -c 1 --disable-tui

Traceback (paths trimmed):

verifiers.serve.client.env_client.ZMQEnvClient - ERROR - Unexpected error in receive loop
for env server demo (tcp://127.0.0.1:PORT) (Proactor event loop does not implement
add_reader family of methods required for zmq. zmq will work with proactor if tornado
>= 6.1 can be found. Use `asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())`
or install 'tornado>=6.1' to avoid this error.)
Traceback (most recent call last):
  File ".../zmq/asyncio.py", line 51, in _get_selector_windows
    from tornado.platform.asyncio import AddThreadSelectorEventLoop
ModuleNotFoundError: No module named 'tornado'

During handling of the above exception, another exception occurred:

  File ".../verifiers/serve/client/zmq_env_client.py", line 198, in receive_loop
    msg = await self.socket.recv_multipart()
  ...
RuntimeError: Proactor event loop does not implement add_reader family of methods required
for zmq. ...

Process SpawnProcess-1:
Traceback (most recent call last):
  File ".../verifiers/serve/server/env_server.py", line 145, in run_server
    server = cls(*args, **kwargs)
  File ".../verifiers/serve/server/env_router.py", line 134, in __init__
    self.response_pull.bind(self.response_address)
  File ".../zmq/sugar/socket.py", line 320, in bind
    super().bind(addr)
  ...
zmq.error.ZMQError: Protocol not supported (addr='ipc:///tmp/vf-...-responses')

Workaround

Run under WSL/Linux, where ipc:///tmp works.

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