Index worker spins on a large pg_dump .sql with escaped apostrophes
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start by tracing the index worker’s handling of large SQL files and how it processes SQL-escaped apostrophes; the report does not name source files or tests. Try reproducing with a synthetic INSERT INTO ... VALUES file containing cumulative don''t strings, since the original file is private. Done means the worker indexes the file or fails promptly instead of spinning and consuming excessive memory.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Version
codebase-memory-mcp 0.11.0
Platform
macOS (Apple Silicon)
Install channel
GitHub release archive / install.sh / install.ps1 (via mise's github: backend)
Binary variant
standard
What happened, and what did you expect?
I've been running index_repository across ~125 repos, and one of them never finished. I tracked it down to a single 34MB .sql file (a pg_dump fixture). With that file in the repo, the index worker pegs one core (~95% CPU, RSS around 1.6GB), prints no progress, and writes nothing. Excluding just that file, the repo indexes in 83s, including 55 other .sql files up to 2.7MB.
The hang supervisor from #827 does eventually catch it, but with the defaults that takes ~30 minutes (the 15 minute no-progress timeout, then the single-threaded recovery re-run). My per-repo caps were shorter than that, so I never saw it. With CBM_INDEX_WORKER_TIMEOUT_S=20 set on the daemon, the file gets "quarantined after hang" in about 80s, and later runs skip it.
I'd expect the file to index (or at least fail fast). The bug is whatever the worker is spinning on.
Reproduction
I can't share the file (private data), and I haven't managed a synthetic repro yet, so here's what I've narrowed it to:
- The file is one
INSERT INTO ... VALUESstatement spanning ~9.2k lines, with a rich-text JSON document as a string literal in each row. - It reproduces with the file alone in an empty git repo:
codebase-memory-mcp cli --progress index_repository --repo-path <dir> - The words don't matter. Replacing every letter with
xand every digit with0still hangs. - SQL-escaped apostrophes inside words (
don''t) are necessary. Replacing just those (~1,100 in 13.5MB) makes it index in 12s. Removing other escapes (\",\n), HTML attribute quotes (href=''...''), URLs, or empty strings changes nothing. - It's cumulative. Each quarter of the slow rows indexes in 7-9s on its own, but together they take 34s, and a 13.5MB prefix spins indefinitely.
- Simple generators don't trigger it: one
it''sper row at 2-16MB, or random text with apostrophes at the same rate plus\",\n, and HTML, all index in under 10s. So something else about the real structure combines with the''.
Logs
The binary's stripped, but sample puts nearly all CPU in one tight loop around +0x105a760 to +0x105aa58 from the load address. CBM_INDEX_SINGLE_THREAD, CBM_LSP_DISABLED, CBM_DISABLE_LSP_CROSS, CBM_SEMANTIC_ENABLED=0, CBM_TS_TYPE_BUDGET, and CBM_WALK_DEFS_MAX don't change the timing. Happy to grab a CBM_DIAGNOSTICS=1 trajectory if that helps.
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.
- Lingua principale
- C
- Stelle
- 45.8k
- Fork
- 3.8k
- Merge medio
- 3g 4h
- PR unite (30g)
- 208
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DeusData/codebase-memory-mcp
-
bug editor/integration
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DeusData/codebase-memory-mcp#2787 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
editor/integration parsing/quality
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
DeusData/codebase-memory-mcp#2286 ·
I maintainer di solito rispondono entro 2 giorni
-
install writes an unsupported `args` key into the Claude Code SubagentStart hook, so it never runsApertabug editor/integration priority/high stability/performance ux/behavior
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DeusData/codebase-memory-mcp#2239 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
bug priority/high ux/behavior
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DeusData/codebase-memory-mcp#2232 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
documentation editor/integration parsing/quality priority/normal
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
DeusData/codebase-memory-mcp#2169 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di DeusData/codebase-memory-mcp
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
HexaCluster/credcheck#86 ·
-
Wheels for Python 3.15Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
mongodb/winkerberos#175 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
AOMediaCodec/SVT-AV1#3320 ·
-
Add `CPC_TAKE_TILL_CHARS`Apertadifficulty: easy
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100