patches/0001-fix-kv-transfer-abort-race.patch: Fix scheduler assert crash when KV transfer callback arrives after request abort in PD-disaggregated serving. patches/README.md: How to apply patches to source tree or installed package. Per-patch description with problem/fix/impact. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
25 lines
1.2 KiB
Diff
25 lines
1.2 KiB
Diff
--- a/vllm/v1/core/sched/scheduler.py
|
|
+++ b/vllm/v1/core/sched/scheduler.py
|
|
@@ -2097,7 +2097,9 @@
|
|
# KV Connector:: update recv and send status from last step.
|
|
for req_id in kv_connector_output.finished_recving or ():
|
|
logger.debug("Finished recving KV transfer for request %s", req_id)
|
|
- assert req_id in self.requests
|
|
+ if req_id not in self.requests:
|
|
+ logger.warning("Skipping finished_recving for unknown request %s (already aborted?)", req_id)
|
|
+ continue
|
|
req = self.requests[req_id]
|
|
if req.status == RequestStatus.WAITING_FOR_REMOTE_KVS:
|
|
self.finished_recving_kv_req_ids.add(req_id)
|
|
@@ -2106,7 +2108,9 @@
|
|
self._free_blocks(self.requests[req_id])
|
|
for req_id in kv_connector_output.finished_sending or ():
|
|
logger.debug("Finished sending KV transfer for request %s", req_id)
|
|
- assert req_id in self.requests
|
|
+ if req_id not in self.requests:
|
|
+ logger.warning("Skipping finished_sending for unknown request %s (already aborted?)", req_id)
|
|
+ continue
|
|
self._free_blocks(self.requests[req_id])
|
|
|
|
def _update_requests_with_invalid_blocks(
|