Skip to content

watcher: continuous auto-sync re-indexing churn on Windows (real driver of #832) #841

Description

@DeusData

During the #833 review we found the reported 20GB RSS / 100% CPU / 600MB-per-minute growth on 65 markdown files (1.3MB) cannot be produced by a single index run — the reporter's own workaround (CBM_WORKERS=1 plus auto_index false) points at the auto-sync loop re-indexing continuously on Windows and leaking per cycle.

To investigate:

  • Why does the watcher consider an unchanged directory dirty every poll on Windows (mtime granularity? path-normalization mismatch in the git-status hash? CRLF)?
  • Per-cycle retention: what survives repeated index cycles (candidate: mimalloc page_reclaim_on_free=0 stranding pages of exited worker heaps — see fix: memory not released after indexing (20GB+ RSS for 5MB data) #833's one plausible line).
    Reproduction should loop N watcher cycles on an unchanged fixture on windows-latest and assert RSS returns to baseline after cbm_mem_collect.

Refs #832, #833.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.stability/performanceServer crashes, OOM, hangs, high CPU/memorywindowsWindows-specific issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions