NVIDIA / NVIDIA/TensorRT-LLM

[Bug]: KVBM hang when request fails during async KV cache transfer

Open
#12,116 2 comments 0 reactions 2 assignees View on GitHub

@jthomson04 is already working on this.

Since Mar 12, 2026.

bug KV-Cache Management
Dominant language
Python
Stars
14.7k
Forks
2.8k
Avg merge
2d 23h
Merged PRs (30d)
489

Description

System Info
  • GPU: NVIDIA H200 Node
  • TensorRT-LLM version: main (906781bf4)
  • Deployment: Aggregated via NVIDIA Dynamo
  • KVBM enabled
Who can help?

No response

Information
  • The official example scripts
  • My own modified scripts
Tasks
  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)
Reproduction
  1. Deploy Kimi model using TensorRT-LLM with KVBM enabled in Aggregated mode
  2. Send a request with prompt length exceeding max_seq_len (e.g. prompt_len=140529 with max_seq_len=131072)
  3. The request fails with RequestError: default_max_tokens (-N) must be greater than 0
  4. On subsequent iterations, all ranks hang indefinitely — the HangDetector fires after 300s:
[TRT-LLM] [RANK 0] [E] Hang detected, shutting down immediately.
[TRT-LLM] [RANK 7] [E] Hang detected, shutting down immediately.
Expected behavior

The worker should not hanging.

actual behavior

Worker is hanging for 5 minutes then see below error logs:

[TRT-LLM] [RANK 0] [E] Hang detected, shutting down immediately.
[TRT-LLM] [RANK 7] [E] Hang detected, shutting down immediately.
additional notes

Actually I tried the latest build. It is solved by this PR in frontend. But I think the root cause is that when the request fails, its in-flight async KVBM transfer state is not cleaned up. On the next iteration, worker.get_finished() on rank 0 blocks waiting for a transfer that will never complete. This prevents rank 0 from reaching the mpi_allgather barrier, causing a collective stall across all TP ranks.
I created this issue for the PR to fix above.

Before submitting a new issue...
  • Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.