filecachegc.runPass suppresses eviction logs when FreedBytes < target and consecutiveShortfalls > 3
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
Direzione di ricerca
Leggi cmd/atelet/internal/filecachegc/filecachegc.go, in particolare il ramo shortfall alle righe 298–313 e i calcoli del pass alle righe 274–293. Segui come i conteggi di eviction raggiungono la registrazione di shortfall e la metrica recordPass, quindi controlla i test esistenti per il file cache GC. Il lavoro è completo quando un pass che rimuove voci emette un log di eviction anche quando i promemoria di shortfall sono limitati, e il comportamento è coperto da un test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary & Root Cause
The shortfall check (FreedBytes < target) comes before any eviction-specific logging, and the throttle covers the whole branch. When --sandbox-asset-cache-max-bytes is smaller than the pinned entries, every pass is a shortfall. After the third pass, a pass that does evict an entry (here a 164.9 MiB gVisor runtime) logs nothing unless its counter happens to be a multiple of 12. The eviction is visible only in the recordPass metric.
Affected Code Locations
cmd/atelet/internal/filecachegc/filecachegc.go:43-48:shortfallWarnLimit = 3,shortfallReminderEvery = 12cmd/atelet/internal/filecachegc/filecachegc.go:274-293: the pass computesstatsandevictedcmd/atelet/internal/filecachegc/filecachegc.go:298-313: the shortfall branch logs only whenconsecutiveShortfalls <= 3orconsecutiveShortfalls%12 == 0, whether or notevicted > 0. Then it returnscmd/atelet/internal/filecachegc/filecachegc.go:311: the eviction is still counted in therecordPassmetric
if stats.FreedBytes < target {
g.consecutiveShortfalls++
switch {
case g.consecutiveShortfalls <= shortfallWarnLimit:
slog.WarnContext(ctx, "File cache GC could not reach its budget", ...)
case g.consecutiveShortfalls%shortfallReminderEvery == 0:
slog.WarnContext(ctx, "File cache GC still over its budget; ...", ...)
}
g.instruments.recordPass(ctx, g.name, ateattr.FileCacheGCOutcomeShortfall, evicted)
return
}
Detailed Reproduction Guide
- Run atelet with a cache budget smaller than one runtime (see the patch in S-12):
--sandbox-asset-cache-max-bytes=1048576,--sandbox-asset-cache-gc-period=5s,--sandbox-asset-cache-min-age=0s. - Wait for more than 3 consecutive shortfall passes while two runtimes are linked (
skipped_linked: 2). - Unlink one runtime, for example by switching the default (
kubectl patch sandboxconfig gvisor-default --type=merge -p '{"spec":{"defaultVersion":"v5"}}'), and follow the GC log:
kubectl logs -n ate-system <atelet-pod> -c atelet -f | grep -E 'File cache GC|Wrote worker sandbox runtimes'
Expected vs. Actual Behavior
- Expected: Any pass that actually evicts entries (
evicted > 0) logs the eviction, whatever the shortfall throttle says. - Actual: The evicting pass emits no log line.
cache_bytessimply drops between two throttled reminders.
Observed Output & Logs
{"time":"2026-10-27T00:53:53.659828907Z","level":"WARN","msg":"File cache GC still over its budget; what remains is linked by a consumer, younger than the min age, or busy","cache":"sandbox_asset","cache_bytes":329842688,"max_bytes":1048576,"target_bytes":328898970,"freed_bytes":0,"evicted":0,"skipped_linked":2,"skipped_young":0,"skipped_busy":0,"dry_run":false,"took":169717,"consecutive":12}
{"time":"2026-10-27T00:53:59.09342848Z","level":"INFO","msg":"Wrote worker sandbox runtimes","pod_uid":"b30f8613-ad63-401f-9753-68c97bbe9dbd","sandbox_config":"gvisor-default","sandbox_class":"gvisor","default_bundle_hash":"sha256:078445e3672a4bad894f713a43f519e50bff3b9b09a257b8b30a1ecc6ebb5b58","restorable_runtimes":1}
{"time":"2026-10-27T00:54:53.659679459Z","level":"WARN","msg":"File cache GC still over its budget; what remains is linked by a consumer, younger than the min age, or busy","cache":"sandbox_asset","cache_bytes":164921344,"max_bytes":1048576,"target_bytes":163977626,"freed_bytes":0,"evicted":0,"skipped_linked":1,"skipped_young":0,"skipped_busy":0,"dry_run":false,"took":114997,"consecutive":24}
{"time":"2026-10-27T02:24:22.658293993Z","msg":"File cache GC still over its budget; …","cache_bytes":164921344,"freed_bytes":0,"evicted":0,"skipped_linked":1,"consecutive":12}
{"time":"2026-10-27T02:25:22.658130264Z","msg":"File cache GC still over its budget; …","cache_bytes":164921344,"freed_bytes":0,"evicted":0,"skipped_linked":1,"consecutive":24}
- Lingua principale
- Go
- Stelle
- 5.9k
- Fork
- 637
- Merge medio
- 2g 10h
- PR unite (30g)
- 556
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di agent-substrate/substrate
-
area/dev-infra area/observability area/security kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
agent-substrate/substrate#3282 ·
I maintainer di solito rispondono entro 1 giorno
-
docs/egress-trust-bundle.md documents ActorTemplate as a Kubernetes CRD rejected by kubectl ate create actor-template and uses mismatched trust-bundle mount pathsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea/network area/security kind/docs
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
agent-substrate/substrate#3278 ·
I maintainer di solito rispondono entro 1 giorno
-
[bug bash] Actor logs are controlled by Kubernetes RBAC on the pool namespace, not atespace rolesApertaarea/cli area/security bug-bash kind/docs
Difficoltà 1/5 1-3 ore Idoneità per principianti 80/100
agent-substrate/substrate#3242 ·
I maintainer di solito rispondono entro 1 giorno
-
area/security bug-bash kind/docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 83/100
agent-substrate/substrate#3235 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug Bash] A binding with a trailing space is accepted and silently matches nobody.Forse già presa @SHRUTI6991 l’ha presa 1 giorno fa. Apertaarea/security bug-bash kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
agent-substrate/substrate#3232 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di agent-substrate/substrate
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
yetone/magpie#4095 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
docs: Google Safe Browsing flags go-bonnie.dev as "deceptive" (pipe-to-shell install instructions)Apertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
[Bug]: Telegram bot (v3.11.0): "Ban log" no longer sends the current 3xipl-banned.logForse già presa @HamedSanaei l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
MHSanaei/3x-ui#6990 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
bug(tool/internal/instrument): identical inject_code rules from two rule packages are applied twiceAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
open-telemetry/opentelemetry-go-compile-instrumentation#1611 ·
I maintainer di solito rispondono entro 2 giorni