Skip to content

Indexing could not be completed #2184

Open

Description

@developer-final

Version

codebase-memory-mcp 0.10.8

Platform

Windows (x64)

Install channel

GitHub release archive / install.sh / install.ps1

Binary variant

standard

What happened, and what did you expect?

Indexing could not be completed.

Step 1: Download zip OpenClaw
https://github.com/openclaw/openclaw/archive/refs/heads/main.zip

Step 2: Index

codebase-memory-mcp cli index_repository --repo-path "C:/Users/xxx/Desktop/Working/openclaw"
Preparing one-shot local CBM command...
level=warn msg=mem.allocator.preloading_completed still_preloading=false detail=allocator_was_still_preloading,_so_arena_creation_and_purging_were_disabled;_process_init_completed_explicitly
level=info msg=mem.allocator.owned classes=all
level=info msg=mem.init budget_mb=4079 total_ram_mb=16319 source=ram_fraction
Running index_repository locally...
^C

This process could not be completed and caused an out-of-memory error, leading to the unexpected and abrupt termination of other programs.

Reproduction

https://github.com/openclaw/openclaw

Logs


Diagnostics trajectory (memory / performance / leak issues)


Project scale (if relevant)

No response

Confirmations

  • I searched existing issues and this is not a duplicate.
  • My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.

Activity

  1. a380467214-art commented on Sep 12, 2026

    @a380467214-art

    I hit the same Pipeline failed on 0.10.8 / Windows x64 and managed to isolate two independent root causes. Posting in case it helps isolating yours.

    RC1 — a reserved device-name file anywhere in the tree crashes the indexer.

    My repo root contained a file literally named nul (a stray 92-byte file produced by a botched tasklist ... > nul redirect under Git Bash; untracked in git). The indexer crashes before extraction with:

    ValueError: path is on mount '\\.\nul', start on mount 'C:'
    

    Cause: on Windows a nul path resolves to the device path \\.\nul, so any mount/relpath-style check on it throws. Note this is not coverable by .gitignore/.cbmignore — the file is skipped by neither (mine was untracked and still crashed the pipeline).

    Strong tell for this class of bug: copying the exact same code tree to a different directory makes indexing succeed, which is what pointed me here.

    RC2 — real indexable-file count, not repo size, decides whether the worker OOMs.

    Same repo, indexable files (after gitignore), before vs after an .cbmignore:

    indexable files extract memory peak result
    before 12,573 11.3 GB (budget 8.2 GB) Pipeline failed
    after ~1,800 fits indexed, 20,629 nodes / 58,189 edges

    Worker log for the failing run:

    parallel.extract.mem rss_mb=10754 peak_mb=11339 budget_mb=8176
    parallel.extract.done nodes=847649 errors=8
    pass.timing pass=parallel_extract elapsed_ms=46750
    parallel.registry.done files=8109 entries=827414
    

    The bulk was non-source: an unpacked 3rd-party app (5,583 .js), tmp/ (3,317), a docs dir (893). Adding a .cbmignore for those dropped the pipeline into the normal range. Suggestion: the error hint could report candidate/parsed file counts and the memory budget instead of only Check repo_path exists and contains source files — right now both failure modes above are indistinguishable from a typo'd path.

    Adjacent finding (may be a different bug): index_repository over MCP has a hard 60s envelope.

    On this repo the MCP call returns Request timed out at exactly 60s and the supervisor then kills the forked worker:

    warn  mcp.request method=tools/call tool=index_repository status=error duration_ms=60009
    info  index.supervisor.reap outcome=killed exit_code=-1
    error index.supervisor.containment_failed outcome=killed
    

    So any repo that needs >60s must be indexed via cli (which worked fine for me). If intentional, it may be worth documenting; if not, either raising the envelope or making the MCP tool async would help.

  2. added
    priority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.
    stability/performanceServer crashes, OOM, hangs, high CPU/memory
    on Sep 19, 2026
  3. DeusData commented on Sep 25, 2026

    @DeusData
    Owner

    Thank you @developer-final for the clear report and the public reproduction, and @a380467214-art for the detailed worker-log breakdown. The candidate/parsed-file and budget numbers are exactly what we needed.

    Where things stand: v0.11.0 changed a lot here. On Windows the indexing worker now runs inside a Job Object with a hard memory cap (1.5× the budget), so it can no longer take memory from other programs the way 0.10.8 did. Extraction also spills parsed results to disk under the budget, and a run that cannot fit stops with a clear over_memory_budget error and a concrete CBM_MEM_BUDGET_MB retry value instead of the generic "check repo_path" hint.

    We re-ran your exact case (openclaw main, budget 4079 MB) on current main. With many worker threads it indexes cleanly under the budget (about 650k nodes / 3.5M edges in ~80 s). With fewer threads we found a real remaining gap: extraction can finish just under the point where spilling kicks in, and the later resolve/semantic passes then go past the budget. On Windows that is likely to hit the new hard cap, and the error would then say "worker crashed on a file", which is misleading because it is really memory. We're fixing both: making those later passes respect the budget, and reporting the memory evidence when the cap is hit.

    Could you help us confirm on your machine?

    1. Retry with v0.11.0 (or later) and paste the full output plus the last ~50 lines of the worker log.
    2. Tell us your CPU core/thread count and roughly how much RAM is free when you start.
    3. As a workaround meanwhile, CBM_MEM_BUDGET_MB=6000 (if you have the RAM), CBM_WORKERS= a higher value, or a .cbmignore for large non-source trees should let it complete.

    Thanks again, this repro is exactly the kind of real-world case that keeps the memory work honest.

  4. DeusData commented on Sep 28, 2026

    @DeusData
    Owner

    The post-extraction budget fix is up for review in #2394. Thanks again, @developer-final and @a380467214-art!

  5. added 2 commits that reference this issue on Sep 28, 2026
  6. DeusData commented on Sep 30, 2026

    @DeusData
    Owner

    Thank you again, @developer-final! #2394 is now merged to main as d0ec231 and covers part of this issue. We're keeping the issue open for the remaining work and will post here as it lands.

  7. DeusData commented on Oct 19, 2026

    @DeusData
    Owner

    Thank you again for the public case and worker evidence. The September 30 update recorded a partial fix in #2394, and I have no new verified result for the remaining work. Please do not repeat an uncontained OOM just to update this thread.

  8. DeusData commented on Oct 25, 2026

    @DeusData
    Owner

    Thank you again for the public case and worker evidence. The remaining memory-budget work after the recorded partial fix still needs maintainer follow-up. Sorry for the delay; I’ll follow up soon; please do not repeat an uncontained OOM to update the thread.

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

    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