fix(sync): raise maxBuffer to 100 MiB to prevent silent ENOBUFS crash#982
Merged
Merged
Conversation
Node's default maxBuffer for execFileSync is 1 MiB. On repos with 60-100K files, `git diff --name-status -M` output easily exceeds this, causing the sync process to die silently with no error in the log. Observed at /data/brain (99K files, 62K in git ls-files): sync consistently died during the rename-detection phase at ~15% through `buildSyncManifest()`. No stack trace, no error event — just a dead process. The fix survived 5+ full syncs on the same corpus. 100 MiB is generous but bounded. A 100K-file diff with long paths tops out around 10-20 MiB in practice.
brandonlipman
added a commit
to brandonlipman/gbrain
that referenced
this pull request
May 29, 2026
* upstream/master: v0.35.1.0: embedder shootout prereqs (pricing + gateway export + --resume-from) (garrytan#1055) v0.35.0.0 feat: ZeroEntropy zembed-1 + zerank-2 reranker (garrytan#1008) v0.34.4.0 fix(embed): cursor-paginated --stale hardening wave (D2/D3/D4/D6/D7/D8 + regression test) (garrytan#991) v0.34.3.0 fix: supervisor treats code=0 watchdog exits as crashes (garrytan#1003) v0.34.2.0 fix(import): path-based checkpoint resume — kills parallel-drop + failed-file-skip + sort-flip bugs (garrytan#988) v0.34.1.0 fix(mcp): MCP fix wave — source-isolation P0 + PKCE DCR + federated_read + 3 more (garrytan#996) v0.34.0.0 feat: Cathedral III — recursive code intelligence + Leiden clusters + eval gate (garrytan#994) v0.33.3.0 feat(v0.33.3): code intelligence MCP foundation (v0.34 W0a-c + W3) (garrytan#934) v0.33.2.1 docs: fork-PR workflow for garrytan-agents (garrytan#992) fix(sync): raise maxBuffer to 100 MiB to prevent silent ENOBUFS crash (garrytan#982) v0.33.2.0 feat(search-lite): token budget + semantic query cache + intent weighting (garrytan#897) v0.33.1.1 fix: Voyage output_dimension + flexible-dim guard + OOM-cap rethrow (garrytan#962)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
git()helper insync.tsusesexecFileSyncwith Node's default 1 MiBmaxBuffer. On repos with 60–100K files,git diff --name-status -Moutput exceeds this limit, killing the sync process silently — no error, no stack trace, just a dead PID.Root Cause
Observed on a 99K-file brain repo (62K tracked by git). Sync consistently died during the rename-detection phase at ~15% through
buildSyncManifest(). TheENOBUFSerror fromexecFileSyncis not caught or logged — the process just vanishes.Fix
Raise
maxBufferto100 * 1024 * 1024(100 MiB). A 100K-file diff with long paths tops out around 10–20 MiB in practice, so 100 MiB is generous but bounded.Testing