vllm - 💡(How to fix) Fix [Bug]: KeyError when use lmcache layerwise mode in vllm 0.14.0 [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#37261Fetched 2026-04-08 00:48:28
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Timeline (top)
commented ×1labeled ×1

Error Message

(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] return forward_call(*args, **kwargs) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "<eval_with_key>.2", line 5, in forward (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] unified_attention_with_output = torch.ops.vllm.unified_attention_with_output(query_2, key_2, value, output_3, 'model.layers.0.self_attn.attn'); query_2 = key_2 = value = output_3 = unified_attention_with_output = None (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 1255, in call (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] return self._op(*args, **kwargs) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/vllm/attention/utils/kv_transfer_utils.py", line 56, in wrapper (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] connector.save_kv_layer(layer_name, kv_cache, attn_metadata) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py", line 175, in save_kv_layer (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] self._lmcache_engine.save_kv_layer( (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/lmcache/integration/vllm/vllm_v1_adapter.py", line 1074, in save_kv_layer (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] next(layerwise_storer) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 38, in generator_context (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] response = gen.send(None) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ^^^^^^^^^^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/lmcache/v1/cache_engine.py", line 650, in store_layer (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] memory_objs_multi_layer = self.storage_manager.batched_allocate( (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/lmcache/v1/storage_backend/storage_manager.py", line 359, in batched_allocate (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] return self.allocator_backend.batched_allocate( (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/lmcache/v1/storage_backend/local_cpu_backend.py", line 670, in batched_allocate (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] old_mem_objs.append(self.hot_cache[key]) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ~~~~~~~~~~~~~~^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] KeyError: LayerCacheEngineKey(model_name='mistralai/Mistral-7B-Instruct-v0.2', world_size=1, worker_id=0, chunk_hash=9190147360584713872, dtype=torch.bfloat16, request_configs=None, tags=None, _dtype_str='bfloat16', layer_id=0) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] During handling of the above exception, another exception occurred: (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] Traceback (most recent call last): (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/kv_connector_model_runner_mixin.py", line 131, in _get_kv_connector_output (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] kv_connector.wait_for_save() (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py", line 187, in wait_for_save (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] self._lmcache_engine.wait_for_save() (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/lmcache/integration/vllm/vllm_v1_adapter.py", line 1093, in wait_for_save (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] next(layerwise_storer) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] StopIteration (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] The above exception was the direct cause of the following exception: (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] Traceback (most recent call last): (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 929, in run_engine_core (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] engine_core.run_busy_loop() (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 956, in run_busy_loop (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] self._process_engine_step() (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 989, in _process_engine_step (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] outputs, model_executed = self.step_fn() (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ^^^^^^^^^^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 491, in step_with_batch_queue (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] exec_model_fut.result() (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/lib/python3.12/concurrent/futures/_base.py", line 449, in result (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] return self.__get_result() (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ^^^^^^^^^^^^^^^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] raise self._exception (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/executor/uniproc_executor.py", line 79, in collective_rpc (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] result = run_method(self.driver_worker, method, args, kwargs) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/serial_utils.py", line 461, in run_method (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] return func(*args, **kwargs) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ^^^^^^^^^^^^^^^^^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/worker_base.py", line 365, in execute_model (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] return self.worker.execute_model(scheduler_output) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 120, in decorate_context (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] return func(*args, **kwargs) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ^^^^^^^^^^^^^^^^^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_worker.py", line 629, in execute_model (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] output = self.model_runner.execute_model( (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 120, in decorate_context (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] return func(*args, **kwargs) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ^^^^^^^^^^^^^^^^^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_model_runner.py", line 3289, in execute_model (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] self.maybe_get_kv_connector_output(scheduler_output) as kv_connector_output, (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] File "/usr/lib/python3.12/contextlib.py", line 158, in exit (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] self.gen.throw(value) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] RuntimeError: generator raised StopIteration (EngineCore_DP0 pid=17830) Process EngineCore_DP0: (APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] AsyncLLM output_handler failed. (APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] Traceback (most recent call last): (APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/async_llm.py", line 502, in output_handler (APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] outputs = await engine_core.get_output_async() (APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core_client.py", line 899, in get_output_async (APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] raise self._format_exception(outputs) from None (APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] vllm.v1.engine.exceptions.EngineDeadError: EngineCore encountered an issue. See stack trace (above) for the root cause. (APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] Error in chat completion stream generator. (APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] Traceback (most recent call last): (APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/serving_chat.py", line 715, in chat_completion_stream_generator (APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] async for res in result_generator: (APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/async_llm.py", line 437, in generate (APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] out = q.get_nowait() or await q.get() (APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] ^^^^^^^^^^^^^ (APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/output_processor.py", line 77, in get (APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] raise output (APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/async_llm.py", line 502, in output_handler (APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] outputs = await engine_core.get_output_async() (APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core_client.py", line 899, in get_output_async (APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] raise self._format_exception(outputs) from None (APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] vllm.v1.engine.exceptions.EngineDeadError: EngineCore encountered an issue. See stack trace (above) for the root cause. (EngineCore_DP0 pid=17830) Traceback (most recent call last): (EngineCore_DP0 pid=17830) File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/kv_connector_model_runner_mixin.py", line 128, in _get_kv_connector_output (EngineCore_DP0 pid=17830) yield output (EngineCore_DP0 pid=17830) File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_model_runner.py", line 3291, in execute_model (EngineCore_DP0 pid=17830) model_output = self._model_forward(

Root Cause

After serveral requests ( about 500 requests each request about 4000 with input len avg in 16 batch size), i encounter an error

(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return forward_call(*args, **kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "<eval_with_key>.2", line 5, in forward
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     unified_attention_with_output = torch.ops.vllm.unified_attention_with_output(query_2, key_2, value, output_3, 'model.layers.0.self_attn.attn');  query_2 = key_2 = value = output_3 = unified_attention_with_output = None
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 1255, in __call__
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return self._op(*args, **kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/attention/utils/kv_transfer_utils.py", line 56, in wrapper
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     connector.save_kv_layer(layer_name, kv_cache, attn_metadata)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py", line 175, in save_kv_layer
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     self._lmcache_engine.save_kv_layer(
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/lmcache/integration/vllm/vllm_v1_adapter.py", line 1074, in save_kv_layer
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     next(layerwise_storer)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 38, in generator_context
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     response = gen.send(None)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]                ^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/lmcache/v1/cache_engine.py", line 650, in store_layer
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     memory_objs_multi_layer = self.storage_manager.batched_allocate(
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/lmcache/v1/storage_backend/storage_manager.py", line 359, in batched_allocate
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return self.allocator_backend.batched_allocate(
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/lmcache/v1/storage_backend/local_cpu_backend.py", line 670, in batched_allocate
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     old_mem_objs.append(self.hot_cache[key])
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]                         ~~~~~~~~~~~~~~^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] KeyError: LayerCacheEngineKey(model_name='mistralai/Mistral-7B-Instruct-v0.2', world_size=1, worker_id=0, chunk_hash=9190147360584713872, dtype=torch.bfloat16, request_configs=None, tags=None, _dtype_str='bfloat16', layer_id=0)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] During handling of the above exception, another exception occurred:
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] Traceback (most recent call last):
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/kv_connector_model_runner_mixin.py", line 131, in _get_kv_connector_output
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     kv_connector.wait_for_save()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py", line 187, in wait_for_save
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     self._lmcache_engine.wait_for_save()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/lmcache/integration/vllm/vllm_v1_adapter.py", line 1093, in wait_for_save
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     next(layerwise_storer)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] StopIteration
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] The above exception was the direct cause of the following exception:
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] Traceback (most recent call last):
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 929, in run_engine_core
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     engine_core.run_busy_loop()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 956, in run_busy_loop
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     self._process_engine_step()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 989, in _process_engine_step
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     outputs, model_executed = self.step_fn()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]                               ^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 491, in step_with_batch_queue
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     exec_model_fut.result()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/lib/python3.12/concurrent/futures/_base.py", line 449, in result
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return self.__get_result()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     raise self._exception
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/executor/uniproc_executor.py", line 79, in collective_rpc
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     result = run_method(self.driver_worker, method, args, kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/serial_utils.py", line 461, in run_method
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return func(*args, **kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/worker_base.py", line 365, in execute_model
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return self.worker.execute_model(scheduler_output)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 120, in decorate_context
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return func(*args, **kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_worker.py", line 629, in execute_model
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     output = self.model_runner.execute_model(
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 120, in decorate_context
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return func(*args, **kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_model_runner.py", line 3289, in execute_model
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     self.maybe_get_kv_connector_output(scheduler_output) as kv_connector_output,
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/lib/python3.12/contextlib.py", line 158, in __exit__
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     self.gen.throw(value)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] RuntimeError: generator raised StopIteration
(EngineCore_DP0 pid=17830) Process EngineCore_DP0:
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] AsyncLLM output_handler failed.
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] Traceback (most recent call last):
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/async_llm.py", line 502, in output_handler
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546]     outputs = await engine_core.get_output_async()
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546]               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core_client.py", line 899, in get_output_async
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546]     raise self._format_exception(outputs) from None
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] vllm.v1.engine.exceptions.EngineDeadError: EngineCore encountered an issue. See stack trace (above) for the root cause.
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] Error in chat completion stream generator.
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] Traceback (most recent call last):
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/serving_chat.py", line 715, in chat_completion_stream_generator
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]     async for res in result_generator:
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/async_llm.py", line 437, in generate
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]     out = q.get_nowait() or await q.get()
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]                             ^^^^^^^^^^^^^
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/output_processor.py", line 77, in get
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]     raise output
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/async_llm.py", line 502, in output_handler
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]     outputs = await engine_core.get_output_async()
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core_client.py", line 899, in get_output_async
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]     raise self._format_exception(outputs) from None
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] vllm.v1.engine.exceptions.EngineDeadError: EngineCore encountered an issue. See stack trace (above) for the root cause.
(EngineCore_DP0 pid=17830) Traceback (most recent call last):
(EngineCore_DP0 pid=17830)   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/kv_connector_model_runner_mixin.py", line 128, in _get_kv_connector_output
(EngineCore_DP0 pid=17830)     yield output
(EngineCore_DP0 pid=17830)   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_model_runner.py", line 3291, in execute_model
(EngineCore_DP0 pid=17830)     model_output = self._model_forward(

The important part is old_mem_objs.append(self.hot_cache[key]) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ~~~~~~~~~~~~~~^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] KeyError: LayerCacheEngineKey(model_name='mistralai/Mistral-7B-Instruct-v0.2', world_size=1, worker_id=0, chunk_hash=9190147360584713872, dtype=torch.bfloat16, request_configs=None, tags=None, _dtype_str='bfloat16', layer_id=0)

Fix Action

Fix / Workaround

============================== CPU Info

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 57 bits virtual Byte Order: Little Endian CPU(s): 192 On-line CPU(s) list: 0-191 Vendor ID: GenuineIntel Model name: Intel(R) Xeon(R) Platinum 8468 CPU family: 6 Model: 143 Thread(s) per core: 2 Core(s) per socket: 48 Socket(s): 2 Stepping: 8 CPU max MHz: 3800.0000 CPU min MHz: 800.0000 BogoMIPS: 4200.00 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vlxsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr avx512_fp16 flush_l1d arch_capabilities L1d cache: 4.5 MiB (96 instances) L1i cache: 3 MiB (96 instances) L2 cache: 192 MiB (96 instances) L3 cache: 210 MiB (2 instances) NUMA node(s): 2 NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190 NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,165,167,169,171,173,175,177,179,181,183,185,187,189,191 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected

Code Example

Collecting environment information...
==============================
        System Info
==============================
OS                           : Ubuntu 22.04.5 LTS (x86_64)
GCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0
Clang version                : Could not collect
CMake version                : Could not collect
Libc version                 : glibc-2.35

==============================
       PyTorch Info
==============================
PyTorch version              : 2.9.1+cu129
Is debug build               : False
CUDA used to build PyTorch   : 12.9
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.12.12 (main, Oct 10 2025, 08:52:57) [GCC 11.4.0] (64-bit runtime)
Python platform              : Linux-5.15.0-125.006-shopee-x86_64-with-glibc2.35

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : True
CUDA runtime version         : 12.9.86
CUDA_MODULE_LOADING set to   :
GPU models and configuration :
GPU 0: NVIDIA H100 80GB HBM3
GPU 1: NVIDIA H100 80GB HBM3

Nvidia driver version        : 550.90.07
cuDNN version                : Could not collect
HIP runtime version          : N/A
MIOpen runtime version       : N/A
Is XNNPACK available         : True

==============================
          CPU Info
==============================
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      46 bits physical, 57 bits virtual
Byte Order:                         Little Endian
CPU(s):                             192
On-line CPU(s) list:                0-191
Vendor ID:                          GenuineIntel
Model name:                         Intel(R) Xeon(R) Platinum 8468
CPU family:                         6
Model:                              143
Thread(s) per core:                 2
Core(s) per socket:                 48
Socket(s):                          2
Stepping:                           8
CPU max MHz:                        3800.0000
CPU min MHz:                        800.0000
BogoMIPS:                           4200.00
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vlxsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr avx512_fp16 flush_l1d arch_capabilities
L1d cache:                          4.5 MiB (96 instances)
L1i cache:                          3 MiB (96 instances)
L2 cache:                           192 MiB (96 instances)
L3 cache:                           210 MiB (2 instances)
NUMA node(s):                       2
NUMA node0 CPU(s):                  0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190
NUMA node1 CPU(s):                  1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,165,167,169,171,173,175,177,179,181,183,185,187,189,191
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Not affected
Vulnerability Retbleed:             Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:           Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected

==============================
Versions of relevant libraries
==============================
[pip3] flashinfer-python==0.5.3
[pip3] numpy==2.2.0
[pip3] nvidia-cublas-cu12==12.9.1.4
[pip3] nvidia-cuda-cupti-cu12==12.9.79
[pip3] nvidia-cuda-nvrtc-cu12==12.9.86
[pip3] nvidia-cuda-runtime-cu12==12.9.79
[pip3] nvidia-cudnn-cu12==9.10.2.21
[pip3] nvidia-cudnn-frontend==1.17.0
[pip3] nvidia-cufft-cu12==11.4.1.4
[pip3] nvidia-cufile-cu12==1.14.1.1
[pip3] nvidia-curand-cu12==10.3.10.19
[pip3] nvidia-cusolver-cu12==11.7.5.82
[pip3] nvidia-cusparse-cu12==12.5.10.65
[pip3] nvidia-cusparselt-cu12==0.7.1
[pip3] nvidia-cutlass-dsl==4.3.5
[pip3] nvidia-ml-py==13.590.44
[pip3] nvidia-nccl-cu12==2.27.5
[pip3] nvidia-nvjitlink-cu12==12.9.86
[pip3] nvidia-nvshmem-cu12==3.3.20
[pip3] nvidia-nvtx-cu12==12.9.79
[pip3] pyzmq==27.1.0
[pip3] torch==2.9.1+cu129
[pip3] torchaudio==2.9.1+cu129
[pip3] torchvision==0.24.1+cu129
[pip3] transformers==4.57.6
[pip3] triton==3.5.1
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : 0.14.1.dev20+g40a0bbfca (git sha: 40a0bbfca)
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled
GPU Topology:
        GPU0    GPU1    NIC0    NIC1    NIC2    NIC3    NIC4    NIC5    NIC6    NIC7    NIC8    NIC9    NIC10   NIC11   NIC12   NIC13   NIC14   NIC15   NIC16   NIC17   NIC18   NIC19   NIC20      CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NV18    SYS     SYS     PIX     PIX     PIX     NODE    PIX     PIX     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE       47,49,51,53     1               N/A
GPU1    NV18     X      SYS     SYS     NODE    NODE    NODE    PIX     NODE    NODE    PIX     PIX     PIX     PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE       47,49,51,53     1               N/A
NIC0    SYS     SYS      X      NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    PIX     PIX     PIX     PIX     SYS
NIC1    SYS     SYS     NODE     X      SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     PIX     PIX     PIX     PIX     NODE    NODE    NODE    NODE    SYS
NIC2    PIX     NODE    SYS     SYS      X      PIX     PIX     NODE    PIX     PIX     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC3    PIX     NODE    SYS     SYS     PIX      X      PIX     NODE    PIX     PIX     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC4    PIX     NODE    SYS     SYS     PIX     PIX      X      NODE    PIX     PIX     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC5    NODE    PIX     SYS     SYS     NODE    NODE    NODE     X      NODE    NODE    PIX     PIX     PIX     PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC6    PIX     NODE    SYS     SYS     PIX     PIX     PIX     NODE     X      PIX     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC7    PIX     NODE    SYS     SYS     PIX     PIX     PIX     NODE    PIX      X      NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC8    NODE    PIX     SYS     SYS     NODE    NODE    NODE    PIX     NODE    NODE     X      PIX     PIX     PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC9    NODE    PIX     SYS     SYS     NODE    NODE    NODE    PIX     NODE    NODE    PIX      X      PIX     PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC10   NODE    PIX     SYS     SYS     NODE    NODE    NODE    PIX     NODE    NODE    PIX     PIX      X      PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC11   NODE    PIX     SYS     SYS     NODE    NODE    NODE    PIX     NODE    NODE    PIX     PIX     PIX      X      SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC12   SYS     SYS     NODE    PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS      X      PIX     PIX     PIX     NODE    NODE    NODE    NODE    SYS
NIC13   SYS     SYS     NODE    PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     PIX      X      PIX     PIX     NODE    NODE    NODE    NODE    SYS
NIC14   SYS     SYS     NODE    PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     PIX     PIX      X      PIX     NODE    NODE    NODE    NODE    SYS
NIC15   SYS     SYS     NODE    PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     PIX     PIX     PIX      X      NODE    NODE    NODE    NODE    SYS
NIC16   SYS     SYS     PIX     NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE     X      PIX     PIX     PIX     SYS
NIC17   SYS     SYS     PIX     NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    PIX      X      PIX     PIX     SYS
NIC18   SYS     SYS     PIX     NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    PIX     PIX      X      PIX     SYS
NIC19   SYS     SYS     PIX     NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    PIX     PIX     PIX      X      SYS
NIC20   NODE    NODE    SYS     SYS     NODE    NODE    NODE    NODE    NODE    NODE    NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS      X

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

NIC Legend:

  NIC0: mlx5_0
  NIC1: mlx5_1
  NIC2: mlx5_2
  NIC3: mlx5_3
  NIC4: mlx5_4
  NIC5: mlx5_5
  NIC6: mlx5_6
  NIC7: mlx5_7
  NIC8: mlx5_8
  NIC9: mlx5_9
  NIC10: mlx5_10
  NIC11: mlx5_11
  NIC12: mlx5_12
  NIC13: mlx5_13
  NIC14: mlx5_14
  NIC15: mlx5_15
  NIC16: mlx5_16
  NIC17: mlx5_17
  NIC18: mlx5_18
  NIC19: mlx5_19
  NIC20: mlx5_bond_0

==============================
     Environment Variables
==============================
NVIDIA_VISIBLE_DEVICES=5,7
NVIDIA_REQUIRE_CUDA=cuda>=12.9 brand=unknown,driver>=535,driver<536 brand=grid,driver>=535,driver<536 brand=tesla,driver>=535,driver<536 brand=nvidia,driver>=535,driver<536 brand=quadro,driver>=535,driver<536 brand=quadrortx,driver>=535,driver<536 brand=nvidiartx,driver>=535,driver<536 brand=vapps,driver>=535,driver<536 brand=vpc,driver>=535,driver<536 brand=vcs,driver>=535,driver<536 brand=vws,driver>=535,driver<536 brand=cloudgaming,driver>=535,driver<536 brand=unknown,driver>=550,driver<551 brand=grid,driver>=550,driver<551 brand=tesla,driver>=550,driver<551 brand=nvidia,driver>=550,driver<551 brand=quadro,driver>=550,driver<551 brand=quadrortx,driver>=550,driver<551 brand=nvidiartx,driver>=550,driver<551 brand=vapps,driver>=550,driver<551 brand=vpc,driver>=550,driver<551 brand=vcs,driver>=550,driver<551 brand=vws,driver>=550,driver<551 brand=cloudgaming,driver>=550,driver<551 brand=unknown,driver>=560,driver<561 brand=grid,driver>=560,driver<561 brand=tesla,driver>=560,driver<561 brand=nvidia,driver>=560,driver<561 brand=quadro,driver>=560,driver<561 brand=quadrortx,driver>=560,driver<561 brand=nvidiartx,driver>=560,driver<561 brand=vapps,driver>=560,driver<561 brand=vpc,driver>=560,driver<561 brand=vcs,driver>=560,driver<561 brand=vws,driver>=560,driver<561 brand=cloudgaming,driver>=560,driver<561 brand=unknown,driver>=565,driver<566 brand=grid,driver>=565,driver<566 brand=tesla,driver>=565,driver<566 brand=nvidia,driver>=565,driver<566 brand=quadro,driver>=565,driver<566 brand=quadrortx,driver>=565,driver<566 brand=nvidiartx,driver>=565,driver<566 brand=vapps,driver>=565,driver<566 brand=vpc,driver>=565,driver<566 brand=vcs,driver>=565,driver<566 brand=vws,driver>=565,driver<566 brand=cloudgaming,driver>=565,driver<566 brand=unknown,driver>=570,driver<571 brand=grid,driver>=570,driver<571 brand=tesla,driver>=570,driver<571 brand=nvidia,driver>=570,driver<571 brand=quadro,driver>=570,driver<571 brand=quadrortx,driver>=570,driver<571 brand=nvidiartx,driver>=570,driver<571 brand=vapps,driver>=570,driver<571 brand=vpc,driver>=570,driver<571 brand=vcs,driver>=570,driver<571 brand=vws,driver>=570,driver<571 brand=cloudgaming,driver>=570,driver<571
NVIDIA_DRIVER_CAPABILITIES=compute,utility
CUDA_VERSION=12.9.1
CUDA_VISIBLE_DEVICES=0,1
CUDA_VISIBLE_DEVICES=0,1
NVIDIA_DISABLE_REQUIRE=true
LD_LIBRARY_PATH=/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib64
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1

---

LMCACHE_USE_LAYERWISE=True PYTHONHASHSEED=0 LMCACHE_CONFIG_FILE=lmcache_config.yaml CUDA_VISIBLE_DEVICES=0 vllm serve mistralai/Mistral-7B-Instruct-v0.2  --gpu-memory-utilization 0.8 --port 8000 --kv-transfer-config '{"kv_connector":"LMCacheConnectorV1", "kv_role":"kv_both"}'

---

chunk_size: 16local_cpu: trueremote_url: "lm://localhost:8100"max_local_cpu_size: 20.0remote_serde: "naive"

---

(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return forward_call(*args, **kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "<eval_with_key>.2", line 5, in forward
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     unified_attention_with_output = torch.ops.vllm.unified_attention_with_output(query_2, key_2, value, output_3, 'model.layers.0.self_attn.attn');  query_2 = key_2 = value = output_3 = unified_attention_with_output = None
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 1255, in __call__
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return self._op(*args, **kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/attention/utils/kv_transfer_utils.py", line 56, in wrapper
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     connector.save_kv_layer(layer_name, kv_cache, attn_metadata)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py", line 175, in save_kv_layer
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     self._lmcache_engine.save_kv_layer(
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/lmcache/integration/vllm/vllm_v1_adapter.py", line 1074, in save_kv_layer
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     next(layerwise_storer)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 38, in generator_context
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     response = gen.send(None)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]                ^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/lmcache/v1/cache_engine.py", line 650, in store_layer
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     memory_objs_multi_layer = self.storage_manager.batched_allocate(
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/lmcache/v1/storage_backend/storage_manager.py", line 359, in batched_allocate
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return self.allocator_backend.batched_allocate(
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/lmcache/v1/storage_backend/local_cpu_backend.py", line 670, in batched_allocate
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     old_mem_objs.append(self.hot_cache[key])
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]                         ~~~~~~~~~~~~~~^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] KeyError: LayerCacheEngineKey(model_name='mistralai/Mistral-7B-Instruct-v0.2', world_size=1, worker_id=0, chunk_hash=9190147360584713872, dtype=torch.bfloat16, request_configs=None, tags=None, _dtype_str='bfloat16', layer_id=0)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] During handling of the above exception, another exception occurred:
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] Traceback (most recent call last):
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/kv_connector_model_runner_mixin.py", line 131, in _get_kv_connector_output
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     kv_connector.wait_for_save()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py", line 187, in wait_for_save
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     self._lmcache_engine.wait_for_save()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/lmcache/integration/vllm/vllm_v1_adapter.py", line 1093, in wait_for_save
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     next(layerwise_storer)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] StopIteration
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] The above exception was the direct cause of the following exception:
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] Traceback (most recent call last):
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 929, in run_engine_core
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     engine_core.run_busy_loop()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 956, in run_busy_loop
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     self._process_engine_step()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 989, in _process_engine_step
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     outputs, model_executed = self.step_fn()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]                               ^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 491, in step_with_batch_queue
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     exec_model_fut.result()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/lib/python3.12/concurrent/futures/_base.py", line 449, in result
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return self.__get_result()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     raise self._exception
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/executor/uniproc_executor.py", line 79, in collective_rpc
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     result = run_method(self.driver_worker, method, args, kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/serial_utils.py", line 461, in run_method
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return func(*args, **kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/worker_base.py", line 365, in execute_model
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return self.worker.execute_model(scheduler_output)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 120, in decorate_context
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return func(*args, **kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_worker.py", line 629, in execute_model
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     output = self.model_runner.execute_model(
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 120, in decorate_context
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return func(*args, **kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_model_runner.py", line 3289, in execute_model
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     self.maybe_get_kv_connector_output(scheduler_output) as kv_connector_output,
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/lib/python3.12/contextlib.py", line 158, in __exit__
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     self.gen.throw(value)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] RuntimeError: generator raised StopIteration
(EngineCore_DP0 pid=17830) Process EngineCore_DP0:
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] AsyncLLM output_handler failed.
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] Traceback (most recent call last):
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/async_llm.py", line 502, in output_handler
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546]     outputs = await engine_core.get_output_async()
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546]               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core_client.py", line 899, in get_output_async
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546]     raise self._format_exception(outputs) from None
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] vllm.v1.engine.exceptions.EngineDeadError: EngineCore encountered an issue. See stack trace (above) for the root cause.
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] Error in chat completion stream generator.
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] Traceback (most recent call last):
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/serving_chat.py", line 715, in chat_completion_stream_generator
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]     async for res in result_generator:
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/async_llm.py", line 437, in generate
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]     out = q.get_nowait() or await q.get()
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]                             ^^^^^^^^^^^^^
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/output_processor.py", line 77, in get
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]     raise output
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/async_llm.py", line 502, in output_handler
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]     outputs = await engine_core.get_output_async()
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core_client.py", line 899, in get_output_async
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]     raise self._format_exception(outputs) from None
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] vllm.v1.engine.exceptions.EngineDeadError: EngineCore encountered an issue. See stack trace (above) for the root cause.
(EngineCore_DP0 pid=17830) Traceback (most recent call last):
(EngineCore_DP0 pid=17830)   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/kv_connector_model_runner_mixin.py", line 128, in _get_kv_connector_output
(EngineCore_DP0 pid=17830)     yield output
(EngineCore_DP0 pid=17830)   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_model_runner.py", line 3291, in execute_model
(EngineCore_DP0 pid=17830)     model_output = self._model_forward(
RAW_BUFFERClick to expand / collapse

Your current environment

<details> <summary>The output of <code>python collect_env.py</code></summary>
Collecting environment information...
==============================
        System Info
==============================
OS                           : Ubuntu 22.04.5 LTS (x86_64)
GCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0
Clang version                : Could not collect
CMake version                : Could not collect
Libc version                 : glibc-2.35

==============================
       PyTorch Info
==============================
PyTorch version              : 2.9.1+cu129
Is debug build               : False
CUDA used to build PyTorch   : 12.9
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.12.12 (main, Oct 10 2025, 08:52:57) [GCC 11.4.0] (64-bit runtime)
Python platform              : Linux-5.15.0-125.006-shopee-x86_64-with-glibc2.35

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : True
CUDA runtime version         : 12.9.86
CUDA_MODULE_LOADING set to   :
GPU models and configuration :
GPU 0: NVIDIA H100 80GB HBM3
GPU 1: NVIDIA H100 80GB HBM3

Nvidia driver version        : 550.90.07
cuDNN version                : Could not collect
HIP runtime version          : N/A
MIOpen runtime version       : N/A
Is XNNPACK available         : True

==============================
          CPU Info
==============================
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      46 bits physical, 57 bits virtual
Byte Order:                         Little Endian
CPU(s):                             192
On-line CPU(s) list:                0-191
Vendor ID:                          GenuineIntel
Model name:                         Intel(R) Xeon(R) Platinum 8468
CPU family:                         6
Model:                              143
Thread(s) per core:                 2
Core(s) per socket:                 48
Socket(s):                          2
Stepping:                           8
CPU max MHz:                        3800.0000
CPU min MHz:                        800.0000
BogoMIPS:                           4200.00
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vlxsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr avx512_fp16 flush_l1d arch_capabilities
L1d cache:                          4.5 MiB (96 instances)
L1i cache:                          3 MiB (96 instances)
L2 cache:                           192 MiB (96 instances)
L3 cache:                           210 MiB (2 instances)
NUMA node(s):                       2
NUMA node0 CPU(s):                  0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190
NUMA node1 CPU(s):                  1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,165,167,169,171,173,175,177,179,181,183,185,187,189,191
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Not affected
Vulnerability Retbleed:             Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:           Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected

==============================
Versions of relevant libraries
==============================
[pip3] flashinfer-python==0.5.3
[pip3] numpy==2.2.0
[pip3] nvidia-cublas-cu12==12.9.1.4
[pip3] nvidia-cuda-cupti-cu12==12.9.79
[pip3] nvidia-cuda-nvrtc-cu12==12.9.86
[pip3] nvidia-cuda-runtime-cu12==12.9.79
[pip3] nvidia-cudnn-cu12==9.10.2.21
[pip3] nvidia-cudnn-frontend==1.17.0
[pip3] nvidia-cufft-cu12==11.4.1.4
[pip3] nvidia-cufile-cu12==1.14.1.1
[pip3] nvidia-curand-cu12==10.3.10.19
[pip3] nvidia-cusolver-cu12==11.7.5.82
[pip3] nvidia-cusparse-cu12==12.5.10.65
[pip3] nvidia-cusparselt-cu12==0.7.1
[pip3] nvidia-cutlass-dsl==4.3.5
[pip3] nvidia-ml-py==13.590.44
[pip3] nvidia-nccl-cu12==2.27.5
[pip3] nvidia-nvjitlink-cu12==12.9.86
[pip3] nvidia-nvshmem-cu12==3.3.20
[pip3] nvidia-nvtx-cu12==12.9.79
[pip3] pyzmq==27.1.0
[pip3] torch==2.9.1+cu129
[pip3] torchaudio==2.9.1+cu129
[pip3] torchvision==0.24.1+cu129
[pip3] transformers==4.57.6
[pip3] triton==3.5.1
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : 0.14.1.dev20+g40a0bbfca (git sha: 40a0bbfca)
vLLM Build Flags:
  CUDA Archs: Not Set; ROCm: Disabled
GPU Topology:
        GPU0    GPU1    NIC0    NIC1    NIC2    NIC3    NIC4    NIC5    NIC6    NIC7    NIC8    NIC9    NIC10   NIC11   NIC12   NIC13   NIC14   NIC15   NIC16   NIC17   NIC18   NIC19   NIC20      CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NV18    SYS     SYS     PIX     PIX     PIX     NODE    PIX     PIX     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE       47,49,51,53     1               N/A
GPU1    NV18     X      SYS     SYS     NODE    NODE    NODE    PIX     NODE    NODE    PIX     PIX     PIX     PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE       47,49,51,53     1               N/A
NIC0    SYS     SYS      X      NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    PIX     PIX     PIX     PIX     SYS
NIC1    SYS     SYS     NODE     X      SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     PIX     PIX     PIX     PIX     NODE    NODE    NODE    NODE    SYS
NIC2    PIX     NODE    SYS     SYS      X      PIX     PIX     NODE    PIX     PIX     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC3    PIX     NODE    SYS     SYS     PIX      X      PIX     NODE    PIX     PIX     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC4    PIX     NODE    SYS     SYS     PIX     PIX      X      NODE    PIX     PIX     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC5    NODE    PIX     SYS     SYS     NODE    NODE    NODE     X      NODE    NODE    PIX     PIX     PIX     PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC6    PIX     NODE    SYS     SYS     PIX     PIX     PIX     NODE     X      PIX     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC7    PIX     NODE    SYS     SYS     PIX     PIX     PIX     NODE    PIX      X      NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC8    NODE    PIX     SYS     SYS     NODE    NODE    NODE    PIX     NODE    NODE     X      PIX     PIX     PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC9    NODE    PIX     SYS     SYS     NODE    NODE    NODE    PIX     NODE    NODE    PIX      X      PIX     PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC10   NODE    PIX     SYS     SYS     NODE    NODE    NODE    PIX     NODE    NODE    PIX     PIX      X      PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC11   NODE    PIX     SYS     SYS     NODE    NODE    NODE    PIX     NODE    NODE    PIX     PIX     PIX      X      SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE
NIC12   SYS     SYS     NODE    PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS      X      PIX     PIX     PIX     NODE    NODE    NODE    NODE    SYS
NIC13   SYS     SYS     NODE    PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     PIX      X      PIX     PIX     NODE    NODE    NODE    NODE    SYS
NIC14   SYS     SYS     NODE    PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     PIX     PIX      X      PIX     NODE    NODE    NODE    NODE    SYS
NIC15   SYS     SYS     NODE    PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     PIX     PIX     PIX      X      NODE    NODE    NODE    NODE    SYS
NIC16   SYS     SYS     PIX     NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE     X      PIX     PIX     PIX     SYS
NIC17   SYS     SYS     PIX     NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    PIX      X      PIX     PIX     SYS
NIC18   SYS     SYS     PIX     NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    PIX     PIX      X      PIX     SYS
NIC19   SYS     SYS     PIX     NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    PIX     PIX     PIX      X      SYS
NIC20   NODE    NODE    SYS     SYS     NODE    NODE    NODE    NODE    NODE    NODE    NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS      X

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

NIC Legend:

  NIC0: mlx5_0
  NIC1: mlx5_1
  NIC2: mlx5_2
  NIC3: mlx5_3
  NIC4: mlx5_4
  NIC5: mlx5_5
  NIC6: mlx5_6
  NIC7: mlx5_7
  NIC8: mlx5_8
  NIC9: mlx5_9
  NIC10: mlx5_10
  NIC11: mlx5_11
  NIC12: mlx5_12
  NIC13: mlx5_13
  NIC14: mlx5_14
  NIC15: mlx5_15
  NIC16: mlx5_16
  NIC17: mlx5_17
  NIC18: mlx5_18
  NIC19: mlx5_19
  NIC20: mlx5_bond_0

==============================
     Environment Variables
==============================
NVIDIA_VISIBLE_DEVICES=5,7
NVIDIA_REQUIRE_CUDA=cuda>=12.9 brand=unknown,driver>=535,driver<536 brand=grid,driver>=535,driver<536 brand=tesla,driver>=535,driver<536 brand=nvidia,driver>=535,driver<536 brand=quadro,driver>=535,driver<536 brand=quadrortx,driver>=535,driver<536 brand=nvidiartx,driver>=535,driver<536 brand=vapps,driver>=535,driver<536 brand=vpc,driver>=535,driver<536 brand=vcs,driver>=535,driver<536 brand=vws,driver>=535,driver<536 brand=cloudgaming,driver>=535,driver<536 brand=unknown,driver>=550,driver<551 brand=grid,driver>=550,driver<551 brand=tesla,driver>=550,driver<551 brand=nvidia,driver>=550,driver<551 brand=quadro,driver>=550,driver<551 brand=quadrortx,driver>=550,driver<551 brand=nvidiartx,driver>=550,driver<551 brand=vapps,driver>=550,driver<551 brand=vpc,driver>=550,driver<551 brand=vcs,driver>=550,driver<551 brand=vws,driver>=550,driver<551 brand=cloudgaming,driver>=550,driver<551 brand=unknown,driver>=560,driver<561 brand=grid,driver>=560,driver<561 brand=tesla,driver>=560,driver<561 brand=nvidia,driver>=560,driver<561 brand=quadro,driver>=560,driver<561 brand=quadrortx,driver>=560,driver<561 brand=nvidiartx,driver>=560,driver<561 brand=vapps,driver>=560,driver<561 brand=vpc,driver>=560,driver<561 brand=vcs,driver>=560,driver<561 brand=vws,driver>=560,driver<561 brand=cloudgaming,driver>=560,driver<561 brand=unknown,driver>=565,driver<566 brand=grid,driver>=565,driver<566 brand=tesla,driver>=565,driver<566 brand=nvidia,driver>=565,driver<566 brand=quadro,driver>=565,driver<566 brand=quadrortx,driver>=565,driver<566 brand=nvidiartx,driver>=565,driver<566 brand=vapps,driver>=565,driver<566 brand=vpc,driver>=565,driver<566 brand=vcs,driver>=565,driver<566 brand=vws,driver>=565,driver<566 brand=cloudgaming,driver>=565,driver<566 brand=unknown,driver>=570,driver<571 brand=grid,driver>=570,driver<571 brand=tesla,driver>=570,driver<571 brand=nvidia,driver>=570,driver<571 brand=quadro,driver>=570,driver<571 brand=quadrortx,driver>=570,driver<571 brand=nvidiartx,driver>=570,driver<571 brand=vapps,driver>=570,driver<571 brand=vpc,driver>=570,driver<571 brand=vcs,driver>=570,driver<571 brand=vws,driver>=570,driver<571 brand=cloudgaming,driver>=570,driver<571
NVIDIA_DRIVER_CAPABILITIES=compute,utility
CUDA_VERSION=12.9.1
CUDA_VISIBLE_DEVICES=0,1
CUDA_VISIBLE_DEVICES=0,1
NVIDIA_DISABLE_REQUIRE=true
LD_LIBRARY_PATH=/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib64
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
</details>

🐛 Describe the bug

I use code below to start the server.

LMCACHE_USE_LAYERWISE=True PYTHONHASHSEED=0 LMCACHE_CONFIG_FILE=lmcache_config.yaml CUDA_VISIBLE_DEVICES=0 vllm serve mistralai/Mistral-7B-Instruct-v0.2  --gpu-memory-utilization 0.8 --port 8000 --kv-transfer-config '{"kv_connector":"LMCacheConnectorV1", "kv_role":"kv_both"}'

The yaml file is

chunk_size: 16local_cpu: trueremote_url: "lm://localhost:8100"max_local_cpu_size: 20.0remote_serde: "naive"

and i use lmcache version is 0.4.1

After serveral requests ( about 500 requests each request about 4000 with input len avg in 16 batch size), i encounter an error

(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return forward_call(*args, **kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "<eval_with_key>.2", line 5, in forward
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     unified_attention_with_output = torch.ops.vllm.unified_attention_with_output(query_2, key_2, value, output_3, 'model.layers.0.self_attn.attn');  query_2 = key_2 = value = output_3 = unified_attention_with_output = None
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 1255, in __call__
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return self._op(*args, **kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/attention/utils/kv_transfer_utils.py", line 56, in wrapper
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     connector.save_kv_layer(layer_name, kv_cache, attn_metadata)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py", line 175, in save_kv_layer
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     self._lmcache_engine.save_kv_layer(
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/lmcache/integration/vllm/vllm_v1_adapter.py", line 1074, in save_kv_layer
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     next(layerwise_storer)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 38, in generator_context
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     response = gen.send(None)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]                ^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/lmcache/v1/cache_engine.py", line 650, in store_layer
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     memory_objs_multi_layer = self.storage_manager.batched_allocate(
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/lmcache/v1/storage_backend/storage_manager.py", line 359, in batched_allocate
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return self.allocator_backend.batched_allocate(
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/lmcache/v1/storage_backend/local_cpu_backend.py", line 670, in batched_allocate
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     old_mem_objs.append(self.hot_cache[key])
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]                         ~~~~~~~~~~~~~~^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] KeyError: LayerCacheEngineKey(model_name='mistralai/Mistral-7B-Instruct-v0.2', world_size=1, worker_id=0, chunk_hash=9190147360584713872, dtype=torch.bfloat16, request_configs=None, tags=None, _dtype_str='bfloat16', layer_id=0)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] During handling of the above exception, another exception occurred:
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] Traceback (most recent call last):
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/kv_connector_model_runner_mixin.py", line 131, in _get_kv_connector_output
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     kv_connector.wait_for_save()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py", line 187, in wait_for_save
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     self._lmcache_engine.wait_for_save()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/lmcache/integration/vllm/vllm_v1_adapter.py", line 1093, in wait_for_save
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     next(layerwise_storer)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] StopIteration
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] The above exception was the direct cause of the following exception:
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] Traceback (most recent call last):
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 929, in run_engine_core
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     engine_core.run_busy_loop()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 956, in run_busy_loop
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     self._process_engine_step()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 989, in _process_engine_step
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     outputs, model_executed = self.step_fn()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]                               ^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core.py", line 491, in step_with_batch_queue
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     exec_model_fut.result()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/lib/python3.12/concurrent/futures/_base.py", line 449, in result
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return self.__get_result()
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     raise self._exception
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/executor/uniproc_executor.py", line 79, in collective_rpc
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     result = run_method(self.driver_worker, method, args, kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/serial_utils.py", line 461, in run_method
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return func(*args, **kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/worker_base.py", line 365, in execute_model
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return self.worker.execute_model(scheduler_output)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 120, in decorate_context
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return func(*args, **kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_worker.py", line 629, in execute_model
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     output = self.model_runner.execute_model(
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py", line 120, in decorate_context
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     return func(*args, **kwargs)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]            ^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_model_runner.py", line 3289, in execute_model
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     self.maybe_get_kv_connector_output(scheduler_output) as kv_connector_output,
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]   File "/usr/lib/python3.12/contextlib.py", line 158, in __exit__
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938]     self.gen.throw(value)
(EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] RuntimeError: generator raised StopIteration
(EngineCore_DP0 pid=17830) Process EngineCore_DP0:
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] AsyncLLM output_handler failed.
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] Traceback (most recent call last):
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/async_llm.py", line 502, in output_handler
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546]     outputs = await engine_core.get_output_async()
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546]               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core_client.py", line 899, in get_output_async
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546]     raise self._format_exception(outputs) from None
(APIServer pid=17742) ERROR 03-17 14:38:51 [async_llm.py:546] vllm.v1.engine.exceptions.EngineDeadError: EngineCore encountered an issue. See stack trace (above) for the root cause.
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] Error in chat completion stream generator.
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] Traceback (most recent call last):
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]   File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/serving_chat.py", line 715, in chat_completion_stream_generator
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]     async for res in result_generator:
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/async_llm.py", line 437, in generate
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]     out = q.get_nowait() or await q.get()
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]                             ^^^^^^^^^^^^^
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/output_processor.py", line 77, in get
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]     raise output
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/async_llm.py", line 502, in output_handler
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]     outputs = await engine_core.get_output_async()
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/engine/core_client.py", line 899, in get_output_async
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343]     raise self._format_exception(outputs) from None
(APIServer pid=17742) ERROR 03-17 14:38:51 [serving_chat.py:1343] vllm.v1.engine.exceptions.EngineDeadError: EngineCore encountered an issue. See stack trace (above) for the root cause.
(EngineCore_DP0 pid=17830) Traceback (most recent call last):
(EngineCore_DP0 pid=17830)   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/kv_connector_model_runner_mixin.py", line 128, in _get_kv_connector_output
(EngineCore_DP0 pid=17830)     yield output
(EngineCore_DP0 pid=17830)   File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_model_runner.py", line 3291, in execute_model
(EngineCore_DP0 pid=17830)     model_output = self._model_forward(

The important part is old_mem_objs.append(self.hot_cache[key]) (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] ~~~~~~~~~~~~~~^^^^^ (EngineCore_DP0 pid=17830) ERROR 03-17 14:38:51 [core.py:938] KeyError: LayerCacheEngineKey(model_name='mistralai/Mistral-7B-Instruct-v0.2', world_size=1, worker_id=0, chunk_hash=9190147360584713872, dtype=torch.bfloat16, request_configs=None, tags=None, _dtype_str='bfloat16', layer_id=0)

But i use layerwise=False the error wont happen.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

extent analysis

Fix Plan

The error occurs due to a KeyError exception when trying to access a key in the hot_cache dictionary. This issue arises when using LMCACHE_USE_LAYERWISE=True.

To fix this issue, you can try the following steps:

  • Update the lmcache version to the latest one, as the issue might be resolved in the newer versions.
  • If updating the lmcache version does not resolve the issue, try setting LMCACHE_USE_LAYERWISE=False as you have already done, which seems to prevent the error from occurring.
  • If setting LMCACHE_USE_LAYERWISE=False is not a viable solution for your use case, you may need to modify the code to handle the KeyError exception properly.

Here's an example of how you can modify the code to handle the KeyError exception:

try:
    old_mem_objs.append(self.hot_cache[key])
except KeyError:
    # Handle the KeyError exception, for example, by logging an error message
    logging.error(f"Key {key} not found in hot_cache")
    # You can also add additional logic to handle the missing key

Verification

To verify that the fix worked, you can run your application with the modified code and check if the KeyError exception still occurs. If the exception is handled properly, your application should continue running without crashing.

Extra Tips

Make sure to test your application thoroughly after applying the fix to ensure that it works as expected. Additionally, if you are using a older version of lmcache, consider updating to the latest version, as it may include bug fixes and improvements that could resolve the issue.

Also, note that the LMCACHE_USE_LAYERWISE flag is set to True in your original command, but the error message suggests that the issue occurs when this flag is set to True. Therefore, setting this flag to False might be a viable workaround for your specific use case.

If none of these solutions work, you may need to dig deeper into the code and the lmcache library to understand the root cause of the issue and find a suitable fix.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

vllm - 💡(How to fix) Fix [Bug]: KeyError when use lmcache layerwise mode in vllm 0.14.0 [1 comments, 2 participants]