A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 9, 00:00 UTC
[Bugfix][Async][Connector] avoid vllm-side double free during async scheduling + request abort + async KV cache transfer (#33377)
Signed-off-by: KuntaiDu <kuntai@uchicago.edu>
Kuntai Du committed
Feb 3, 2026 at 21:50 UTC
fbb3cf698123cc1243dae8003b63dfa807ef8b53
1 file changed
+6
-2
vllm/v1/core/sched/scheduler.py
+6
-2
@@ -1258,10 +1258,14 @@ class Scheduler(SchedulerInterface):
1258
# skip failed or rescheduled requests from KV load failure
1259
continue
1260
request = self.requests.get(req_id)
1261
- if request is None:
1261
+ if request is None or request.is_finished():
1262
# The request is already finished. This can happen if the
1263
# request is aborted while the model is executing it (e.g.,
1264
- # in pipeline parallelism).
1264
+ # in pipeline parallelism or in async scheduling).
1265
+ # NOTE(Kuntai): When delay_free_blocks=True (for async KV
1266
+ # cache transfer in KV connector), the aborted request will not
1267
+ # be set to None (in order to finish async KV transfer).
1268
+ # In this case, we use is_finished() to check.
1269
continue
1270
1271
req_index = model_runner_output.req_id_to_index[req_id]