Skip to content

SIGBUS/pagein crash recurs on v0.10.2 despite #314 fixes, under shared-daemon multi-session model #1569

Description

@romanbsd

Summary

Recurrence of #314 (SIGBUS on macOS arm64 when 2+ sessions share the same cache dir) observed on a version that postdates both landed fixes (#315 CBM_SQLITE_MMAP_SIZE knob, #316 PASSIVE checkpoint).

Crash signature (identical to #314)

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: 0x000000000000000a
Termination:     Namespace SIGNAL, Code 10, Bus error: 10
Signal subtype:  FS pagein error: 22 Invalid argument
ktriageinfo:
  CL  - cluster_pagein past EOF
  APFS - cluster_pagein() failed
  VM  - Filesystem pagein returned an error in vnode_pagein
  VM  - Page has error bit set

Faulting thread stack:

getCellInfo
sqlite3VdbeExec
sqlite3_step
sqlite3_exec
cbm_store_exec
run_post_extraction
cbm_pipeline_run
handle_index_repository
main

Environment

  • codebase-memory-mcp: crashes span builds installed 2026-08-10 → 2026-08-11 12:25 (auto-updated across v0.10.0 → v0.10.1 → v0.10.2 during that window per release timestamps; currently pinned at v0.10.2, build 516e587c13e8)
  • macOS 26.6.1 (25G76), Apple Silicon (arm64)
  • Architecture in use: single shared daemon (--cbm-daemon-internal) + up to 10 concurrent thin client processes (multiple Claude Code / Cursor sessions/windows) attached to the same project cache dir, consistent with the daemon coordination work from feat: coordinate concurrent CBM sessions #1139

What happened

42 separate .ips crash reports for codebase-memory-mcp accumulated between 2026-08-10 11:22 and 2026-08-11 12:25, all with the identical SIGBUS/pagein-22/cluster_pagein past EOF signature, all faulting inside handle_index_repositoryrun_post_extractionsqlite3_exec. Daemon log (~/.cache/codebase-memory-mcp/logs/cbm-daemon.log) shows indexing is supervised as a subprocess (index.supervisor.reap) that is repeatedly re-spawned by watcher.changed events firing on every file change with 10 clients attached to the same project — i.e. exactly the multi-session-sharing scenario #314 describes.

From a client's perspective this surfaces as Transport closed on any in-flight tool call (e.g. query_graph) made while the supervised worker was mid-crash.

No new crash reports since 2026-08-11 12:25 (before the v0.10.2 auto-update at 17:08 that day) — so it's possible v0.10.2 already narrowed the window, but given the fixes from #314 predate v0.9.0 and this still reproduced on a build that includes them, filing separately rather than assuming it's closed.

Mitigation applied

Set CBM_SQLITE_MMAP_SIZE=0 per the workaround noted in the #314 thread. Have not yet been able to fully verify recurrence is prevented, since the existing daemon (already running before the env var was set) won't restart while other sessions are still attached to it (daemon: NOT stopped — 7 committed client(s) still use it) — will confirm once it cycles naturally.

Ask

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingeditor/integrationEditor compatibility and CLI integrationparsing/qualityGraph extraction bugs, false positives, missing edgespriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.stability/performanceServer crashes, OOM, hangs, high CPU/memoryux/behaviorDisplay bugs, docs, adoption UX

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions