AI Trends

Permanent Slime Server Deadlock Fixed

UCSD Hao AI LabUpdated Dec 4 04:44

AI summary

Hao AI Lab has fixed a permanent deadlock issue in Slime's megatron_server: if a client disconnected during a weight reload, subsequent inference requests returned HTTP 503 and update requests returned 409, while /healthz continued to return 200. The server deadlocked in both reproduction attempts; after moving the reload to a separate background task, disconnections no longer interrupted it, and inference recovered to HTTP 200 in both tests.

Body

(5/8) Permanent server lockout: if a client disconnects while megatron_server reloads weights from disk, it refuses all inference and future updates until restarted, while /healthz still passes.

During a reload, megatron_server sets a busy flag and returns HTTP 503 for inference. However, if the client disconnects early, the server cancels the request and skips normal error handling. Cleanup then crashes before clearing the busy flag or waking waiting callers. From then on, /generate returns 503 and new updates return 409, while /healthz still returns 200.

Reproduction: A single client timeout during a weight reload left the server locked out in 2 out of 2 runs, even a minute later.

Our fix: We run reloads in a background task separate from the client connection. Even if a client disconnects, reloads finish, update /info, and resume HTTP 200 inference in both runs.

PR: https://t.co/6xCTfQzc5a

Source

UCSD Hao AI Lab