From 50f2aae1b4afb8799bc6a38254639e031997e61c Mon Sep 17 00:00:00 2001 From: zejunchen-zejun Date: Tue, 12 Aug 2025 17:05:14 +0800 Subject: [PATCH] [LMCache][Example] Align the PYTHONHASHSEED for prefillers and decoders for KV chunks hashing (#21161) Signed-off-by: zejunchen-zejun --- .../disagg_prefill_lmcache_v1/disagg_vllm_launcher.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/others/lmcache/disagg_prefill_lmcache_v1/disagg_vllm_launcher.sh b/examples/others/lmcache/disagg_prefill_lmcache_v1/disagg_vllm_launcher.sh index 1284466a45..682df45d95 100644 --- a/examples/others/lmcache/disagg_prefill_lmcache_v1/disagg_vllm_launcher.sh +++ b/examples/others/lmcache/disagg_prefill_lmcache_v1/disagg_vllm_launcher.sh @@ -15,6 +15,14 @@ else MODEL=$2 fi +# The prefillers and decoders in LMCache use the same hash seed for all chunk keys. +# This seed must be aligned so that decoders can identify and retrieve KV cache +# entries stored by prefillers. +# +# WARNING: Using a fixed hash seed is insecure and makes the application vulnerable to +# denial-of-service attacks. In a production environment, this should be set to a +# secure random value. This is set to a fixed value for demonstration purposes only. +export PYTHONHASHSEED=${VLLM_PYTHON_HASH_SEED:-123} if [[ $1 == "prefiller" ]]; then # Prefiller listens on port 8100