Summary
codebase-memory-mcp v0.5.6 crashes deterministically every ~3 minutes due to a stack overflow in the auto-index background thread. The crash is 100% reproducible — 11 identical crashes in a single day.
Environment
- Version: 0.5.6
- OS: macOS 26.3.1 (25D2128), ARM64 (Mac15,6, 18GB RAM)
- Agent: Claude Code (VS Code extension)
- Repos indexed: 2 projects (~665 + ~400 tracked files, 22MB total DB)
Crash details
Every crash report is identical:
- Exception:
EXC_BAD_ACCESS — Thread stack size exceeded (SIGBUS)
- Faulting thread: Thread 2 (
autoindex_thread)
- Stack:
___chkstk_darwin → cbm_pipeline_pass_configlink → cbm_pipeline_run → autoindex_thread
- Thread stack: 544KB (
0x16b818000-0x16b8a0000), guard page hit at 0x16b817ff8
The server starts, runs for ~3 minutes while auto-indexing, then the cbm_pipeline_pass_configlink function recurses deep enough to blow the 544KB thread stack and crashes with SIGBUS.
Crash frequency (all from 2026-03-24)
| Crash time |
Alive duration |
| 12:11:57 |
~3 min |
| 13:35:28 |
~3 min |
| 13:46:38 |
~3 min |
| 14:02:39 |
~3 min |
| 14:06:07 |
~3.5 min |
| 14:11:31 |
~3 min |
| 14:14:53 |
~3 min |
| 14:37:53 |
~3.5 min |
| 14:38:19 |
~3.5 min |
| 15:04:05 |
~4 min |
| 15:40:43 |
~3 min |
Likely fix
Either:
- Increase the stack size for the
autoindex_thread (e.g., 8MB via pthread_attr_setstacksize)
- Convert
cbm_pipeline_pass_configlink from recursive to iterative traversal
This may be related to the O(N²) traversal pattern in #130 — deep/wide AST structures could compound both the performance and stack depth issues.
Workaround
Disabling auto-indexing prevents the crash:
codebase-memory-mcp config set auto_index false
Manual index_repository calls (which run on the main thread with a larger default stack) still work fine.
Summary
codebase-memory-mcpv0.5.6 crashes deterministically every ~3 minutes due to a stack overflow in the auto-index background thread. The crash is 100% reproducible — 11 identical crashes in a single day.Environment
Crash details
Every crash report is identical:
EXC_BAD_ACCESS— Thread stack size exceeded (SIGBUS)autoindex_thread)___chkstk_darwin→cbm_pipeline_pass_configlink→cbm_pipeline_run→autoindex_thread0x16b818000-0x16b8a0000), guard page hit at0x16b817ff8The server starts, runs for ~3 minutes while auto-indexing, then the
cbm_pipeline_pass_configlinkfunction recurses deep enough to blow the 544KB thread stack and crashes with SIGBUS.Crash frequency (all from 2026-03-24)
Likely fix
Either:
autoindex_thread(e.g., 8MB viapthread_attr_setstacksize)cbm_pipeline_pass_configlinkfrom recursive to iterative traversalThis may be related to the O(N²) traversal pattern in #130 — deep/wide AST structures could compound both the performance and stack depth issues.
Workaround
Disabling auto-indexing prevents the crash:
Manual
index_repositorycalls (which run on the main thread with a larger default stack) still work fine.