Skip to content

index_repository crashes with SIGILL (EXC_BAD_INSTRUCTION) at cbm_pipeline_new entry — reproducible on trivial 1-file repo, macOS 26.5.2 / Apple M3 Pro #1343

Description

@pwills85

Version

codebase-memory-mcp 0.9.0

Platform

macOS (Apple Silicon) — macOS 26.5.2 (25F84), Apple M3 Pro, arm64

Install channel

GitHub release archive / install.sh

Binary variant

standard

What happened, and what did you expect?

index_repository crashes the worker with SIGILL (EXC_BAD_INSTRUCTION) on every repository I've tried on this machine, including a trivial single-file dummy repo — so this doesn't look content-triggered, more like an environment/binary-compatibility issue specific to this OS/CPU combo. Expected: successful indexing (or at minimum a graceful pipeline-init error, not an illegal instruction crash).

Ruled out before filing:

  • Not a code-signing artifact of my install: codesign -dv on the installed binary shows a valid ad-hoc signature (Signature=adhoc, flags=0x2(adhoc)). I also tried codesign --remove-signature + codesign --deep --force -s - (deep re-sign) — identical crash.
  • Not the known parallel-extraction heap-corruption issue (referenced in an open PR that adds CBM_WORKERS as an opt-in): forcing CBM_WORKERS=1 produces the identical crash.
  • Not content-specific: crashes identically on a large real-world monorepo (Python + TypeScript, hundreds of files) and on the 8-line dummy repo below.

Reproduction

  1. Minimal dummy repo (fully shareable, not proprietary):
    mkdir /tmp/cbm-repro && cd /tmp/cbm-repro
    cat > main.py <<'PY'
    def add(a: int, b: int) -> int:
        return a + b
    
    def main():
        result = add(1, 2)
        print(result)
    
    if __name__ == "__main__":
        main()
    PY
    git init -q && git add -A && git commit -q -m "test"
  2. Command:
    codebase-memory-mcp cli index_repository --repo-path /tmp/cbm-repro --name cbm-minimal-test
    
  3. Result: worker crashes with signal=4 every time (2/2 retries). Expected: successful index of a trivial 8-line file.

The macOS crash reporter produced a fully symbolicated report (~/Library/Logs/DiagnosticReports/codebase-memory-mcp-*.ips) pointing at the exact crash site:

Exception Type:  EXC_BAD_INSTRUCTION (SIGILL)
Termination:     Illegal instruction: 4

Crashed thread:
  cbm_pipeline_new              (imageOffset 334264, symbolLocation 0)
  handle_index_repository +932  (imageOffset 229180)
  main +3552                    (imageOffset 9988)
  start +6992

Crash is at symbolLocation 0 of cbm_pipeline_new — i.e. right at/near function entry, called from handle_index_repository. Given it reproduces on a trivial file, this looks less like a parser bug on specific input and more like something in pipeline initialization hitting an unsupported instruction on this CPU/OS combination.

Logs

level=info msg=mem.init budget_mb=6451 total_ram_mb=18432
level=info msg=index.supervisor.reap outcome=crash exit_code=-1 signal=4
level=warn msg=index.supervisor.worker_failed outcome=crash exit_code=-1 log=.../.worker-59082.log
level=info msg=index.supervisor.reap outcome=crash exit_code=-1 signal=4
level=warn msg=index.supervisor.worker_failed outcome=crash exit_code=-1 log=.../.worker-59082.log
level=warn msg=index.supervisor.unattributable action=give_up

Diagnostics trajectory (memory / performance / leak issues)

N/A — this is an immediate crash, not a memory/perf issue, so I didn't collect a CBM_DIAGNOSTICS=1 trajectory. Happy to if useful.

Project scale (if relevant)

N/A on the minimal repro (1 file). On the real-world repo where I first hit this: several hundred Python + TypeScript files, crashes identically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    parsing/qualityGraph extraction bugs, false positives, missing edgesstability/performanceServer crashes, OOM, hangs, high CPU/memory

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions