Controller-session status retry can evict a replica during crash recovery
System Info / 系統信息
Linux CPU deployment with a test extension configuring controller-session authority in both Supervisor and Worker. The authority stays active throughout the crash and recovery. This opt-in mode is documented under Zero-downtime upgrades (Experimental).
Running Xinference with Docker? / 是否使用 Docker 运行 Xinfernece?
Installation from source; no Docker.
Version info / 版本信息
0b46522f6439 (4.2.1.dev29+g0b46522f6), Python 3.12.15, torch 2.15.0+cpu, transformers 5.22.2.
The command used to start Xinference / 用以启动 xinference 的命令
With the controller-session extension loaded in both processes, and XINFERENCE_AUTH_ADVANCED=0 and XINFERENCE_DISABLE_METRICS=1 set for the test deployment:
xinference-supervisor -H 127.0.0.1 -p 9997 --supervisor-port 9998
xinference-worker -e http://127.0.0.1:9997 -H 127.0.0.1 --worker-port 9999
Reproduction / 复现过程
- Have the extension install an active controller session and launch a CPU transformers Qwen3-0.6B model as
chat1. - Kill its model process and let the Worker begin native crash recovery.
- Let a full status report run while the first model recreation is still loading.
In my recorded runs, the Worker logged the same process as down twice, then chat1-rep0 is running and Recreate failed for chat1-rep0, evicting dead replica from supervisor. The first recreation subsequently succeeded. The Supervisor's model list was empty and chat returned 404, while the Worker's list_models() still included chat1-rep0 with a live model process.
This routing loss occurred in 10/10 controller-session runs with default timings, 0/5 runs without the extension, and 0/3 controller-session runs with XINFERENCE_STATUS_REPORT_MULTIPLIER=1000, which kept full status reports outside the recovery window. These are observed counts for this setup.
In a recorded follow-up, deleting chat1 returned 400 and relaunching the same UID returned 500; launching a different UID succeeded.
In xinference/core/worker.py, recover_sub_pool records pending fault intent before awaiting recovery. report_status retries pending addresses, including an active recovery. _retrying_control_faults only serializes retry loops. The duplicate launch fails and reaches replica eviction.
Expected behavior / 期待表现
A status-report retry should skip a recovery already in progress. Successful recreation should retain Supervisor routing, and interrupted recoveries should remain retryable under active-session admission.
AI disclosure: this was prepared with AI assistance (Claude Opus 5.5 and Claude Sonnet 5.5).