Prometheus renderer reuses stale engine state after same-timestamp eviction
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 73/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go, prometheus
- Lĩnh vực
- backend, observability
Hướng nghiên cứu
Start with metricsText in sim/llmd/server.go and read the publication handling in sim/engine_metrics.go alongside NoteAbort and the post-abort step in sim/simulator.go. Run the focused sim/llmd test, then add a regression for a scrape followed by a same-timestamp post-abort publication. Done means the second scrape reports the corrected running, waiting, KV, and adapter state.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The simulated model-server Prometheus renderer caches output using only the maximum EngineMetrics.PublishedAt timestamp as its identity:
metricsTextcomputes the timestamp-only key and returns the cached text- the rendered text is stored under that key
Engine state can legitimately be published twice at the same simulated timestamp. In particular, a scrape at a step boundary can promote the state from the step ending at T; an eviction at T removes the request; then the already-scheduled empty post-abort step publishes the corrected state at T:
publishEngineMetricsreplaces pending state whose publication time is<= atNoteAbortrequests a post-abort publication- the empty post-abort step publishes at its current time
The second state has different values but the same cache key, so subsequent scrapes receive the first state.
Reproduction
A focused sim/llmd test reproduced this sequence:
- Drive one request through its first running engine step.
- At the next step timestamp T, call
metricsText; it rendersvllm:num_requests_running ... 1and caches it under T. - Evict the request at T and process the post-abort step.
- Confirm
EngineMetricsAt(T).Running == 0. - Call
metricsTextagain.
The second call still returns:
vllm:num_requests_running{model_name="test-model"} 1
vllm:kv_cache_usage_perc{model_name="test-model"} 0.0005
even though the newly visible engine metrics report zero running requests and released KV.
Impact
The embedded router can continue treating an evicted/completed request as running and its KV as allocated until some later engine publication changes the timestamp. An idle engine may have no later publication, making the stale state persistent and affecting scoring or flow control.
This is especially reachable at step boundaries because cluster callbacks, including scrapes and eviction callbacks, run before the instance step at the same timestamp.
Acceptance criteria
- Render-cache identity distinguishes different publications at the same simulated timestamp, or caching is removed where identity cannot be established safely.
- A regression test covers a scrape followed by a same-timestamp post-abort publication.
- The second scrape exposes the corrected running/waiting/KV/adapter state.
- Ngôn ngữ chính
- Go
- Star
- 40
- Fork
- 28
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 31
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của inference-sim/inference-sim
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
inference-sim/inference-sim#2110 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
AgentX corpus cache is keyed on the binary's SHA-256, so every new build/pod re-parses the corpusĐang mởperformance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
inference-sim/inference-sim#2086 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/code-hygiene hardening
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
inference-sim/inference-sim#2042 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/ci-tooling bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
inference-sim/inference-sim#2029 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
automation ci-cd hardening
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
inference-sim/inference-sim#1737 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của inference-sim/inference-sim
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/features
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
TencentBlueKing/bk-nodemgr#3991 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
meta
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
last9/last9-mcp-server#554 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Plain-http federation signing external_url fails startup with "invalid federation request signature"Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày