verl 0.7.x abort_all_requests silently no-ops on vllm 0.8.5 (pooling_output TypeError) -> orphaned requests -> CUDA illegal memory access
Summary
With the dependency combination Agent Lightning currently pins (verl>=0.7.1,<0.9.0) plus vllm 0.8.5 (the low end of verl 0.7.1's own declared range vllm>=0.8.5,<=0.12.0), verl's request-abort path silently does nothing. Any training step in which some rollouts fail or time out (very common in agent RL) leaves orphaned requests still generating inside vLLM while the trainer moves on to the FSDP update phase. In our runs this concurrency eventually crashed training with a CUDA illegal memory access in the sampler.
Environment
- agentlightning 1.0.1, verl 0.7.1, vllm 0.8.5, torch FSDP, GRPO
- 2B model, TP=2, vLLM async server mode, agent rollouts via HTTP
Root cause
verl 0.7.1 calls make_request_output with a pooling_output kwarg in both abort paths:
https://github.com/volcengine/verl/blob/v0.7.1/verl/workers/rollout/vllm_rollout/vllm_async_server.py#L717-L720 https://github.com/volcengine/verl/blob/v0.7.1/verl/workers/rollout/vllm_rollout/vllm_async_server.py#L768-L771
but vLLM 0.8.5's RequestState.make_request_output has no such parameter:
https://github.com/vllm-project/vllm/blob/v0.8.5/vllm/v1/engine/output_processor.py#L144-L149
So the first iteration raises TypeError, which is swallowed by the blanket except Exception at the end of abort_all_requests — the method logs one line and returns {"aborted_count": 0}. No request is actually aborted, and from the trainer's perspective nothing failed.
ERROR ... Error aborting requests: RequestState.make_request_output() got an unexpected keyword argument 'pooling_output'
Crash chain (observed)
- A training step has a few rollouts that time out / fail → their vLLM requests are still generating when the step ends.
- Trainer calls abort → silent no-op as above → requests orphaned.
- Orphaned decoding continues concurrently with the FSDP training phase on the same GPUs.
- vLLM engine dies with
CUDA error: an illegal memory access was encounteredinsideSampler.apply_top_k_top_p → logits.sort(), taking the run down.
Supporting evidence from our logs: the pooling_output error line appears exactly twice in the whole run — once per TP server, at the same second as the illegal memory access. Steps where all rollouts finished cleanly (nothing left to abort) never crashed; the first step with 6 timed-out rollouts crashed. After patching the abort call (below), identical workloads run clean.
Why this lands on Agent Lightning
- verl main now requires
vllm>=0.18.0, where thepooling_outputparameter exists — so upstream's current code is fine and a fix there would only target the old 0.7.x/0.8.x release line. - Agent Lightning pins
verl>=0.7.1,<0.9.0(pyproject.toml), and vllm 0.8.5 is a common companion (it is the minimum of verl 0.7.1's declared range). So AGL users are exactly the population that hits this.
Possibly related: #352 also reports vLLM-level crashes under verl training; the root cause discussed there (sleep/prefix-cache) is different, but if anyone in that thread sees Error aborting requests: ... pooling_output in their logs shortly before a crash, it may be this bug instead.
Workaround / suggested fix (validated locally)
A minimal signature-compat shim at both call sites; with it in place, aborts actually take effect and we have not seen the illegal-memory-access crash since:
try:
request_output = req_state.make_request_output(
[], pooling_output=None, finish_reason=FinishReason.ABORT, stop_reason=None
)
except TypeError: # vLLM < 0.9: make_request_output has no pooling_output param
request_output = req_state.make_request_output(
[], finish_reason=FinishReason.ABORT, stop_reason=None
)
Options I can see for AGL: (a) ship a small runtime patch/shim in its verl integration layer, (b) document a minimum vllm version known to work with the abort path, or (c) forward this to verl for a 0.7.x/0.8.x patch release. Happy to submit a PR for whichever direction you prefer.
Please refer to my comment at #590