Skip to content

fix(vllm): fail one request, not the engine, when the worker runs out of memory - #33

Merged
hijohnnylin merged 1 commit into
mainfrom
fix/worker-oom
Oct 7, 2026
Merged

hijohnnylin merged 1 commit into
mainfrom
fix/worker-oom

Conversation

@hijohnnylin

Copy link
Copy Markdown
Contributor

An OOM in the worker's static harvest copy killed EngineCore (seen on a 1×B200 DeepSeek-V4-Flash pod under concurrent lens requests).

  • Harvest copies only each request's own rows; an OOM fails that request, not the step.
  • Collect, drain and lens read-out take the rows first and deregister before they allocate.
  • Under TP, ranks agree on failure before the next collective (no hang).
  • Backend cleanups are shielded and always release.

Tests: ruff, pyright, CPU suite, and 30 vLLM GPU tests pass.

Made with Cursor

… of memory

An out-of-memory error in the worker's static harvest killed EngineCore,
because the copy runs inside execute_model.

- _harvest copies only each capturing request's own rows, one clone per
  request. A request's rows no longer keep its co-batched rows alive.
  On OOM it fails that request and the step goes on.
- Collect, drain and the lens read-out take the rows out of the store
  first. A final call deregisters before it allocates, so an OOM there
  leaves no state behind. Chunk lists are freed as they are joined.
- Under tensor parallelism the ranks agree on failure before the next
  collective, so a rank-local OOM raises on all ranks and does not hang.
- Backend cleanups run shielded, and release runs even when collect
  raises, so a cancelled request does not leave rows in the worker.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hijohnnylin
hijohnnylin merged commit cbeb9ba into main Oct 7, 2026
8 checks passed
@hijohnnylin
hijohnnylin deleted the fix/worker-oom branch October 7, 2026 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant