Skip to content

code-index: a memory-refused reconcile never retries after an idle release #2707

Description

@ScriptedAlchemy

Summary

A code-index reconcile refused for resident memory stops retrying after five capacity refusals ("the next hint retries"). When the graph owners were later released for idleness, freeing the memory the refusal was waiting on, the reconcile never ran again. The worktree stayed stale with no graph owners for over 30 minutes.

Reproduction (master 154a0eb, release production build)

  1. Isolated HOME/TRACEDECAY_DATA_DIR, daemon under systemd-run --user --scope -p MemoryMax=6G -p MemorySwapMax=1G. Corpus: depth-1 clone of this repository (5,855 indexed files).
  2. tracedecay init, wait until graph_engine and graph_catalog are charged, settle 120 s.
  3. Commit a change to 40 files.

Log:

WARN ... measured process RSS reached the admission high watermark ... observed_bytes=5341655040 limit_bytes=6442450944 high_watermark_bytes=5798205849
WARN ... code-index background reconcile failed; the served generation stays stale ... error=code-index worker resident-memory admission refused: ... observed_rss=5086568448 configured_limit=6442450944 high_watermark=5798205849 requested=805306368
WARN ... code-index reconcile stopped retrying a capacity refusal; the next hint retries event="code_index_reconcile_capacity_retry_exhausted" consecutive=5

More than 30 minutes later, tracedecay tool status reported code_index_freshness.status = "stale", memory.owners = [], retained_bytes = 0, and resident_bytes 978,927,616. No further reconcile ran. Process: VmHWM 6,259,384 kB, RssAnon 216,496 kB, VmSwap 716,156 kB.

Expected

Work refused for memory retries when headroom returns. The resident-owner inventory bumps its headroom epoch on every release, including the idle release, so the exhausted capacity retry should subscribe to that epoch rather than wait for an unrelated hint.

The memory reductions in the heap-remainder PR let this journey's refresh publish on the branch, so it no longer reproduces there. The missing retry is independent of them.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions