fix: raise telemetry-extractor heap limit to prevent build OOM (build fix for vscode-engineering#3836) - #335527
Draft
VS Code PR Bot (vscodebot-pr) wants to merge 1 commit into
Conversation
The telemetry extractor node invocations ran at V8's default ~2 GB
old-space ceiling and crashed with a JS heap out-of-memory error as the
scanned source tree grew. Pass --max-old-space-size=8192 to both
extractor invocations so extraction has enough headroom.
Fixes microsoft/vscode-engineering#3836
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
VS Code PR Bot (vscodebot-pr)
September 10, 2026 18:17
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped to adding a Node heap flag for a short-lived build subprocess and does not affect product/runtime behavior.
Pull request overview
This PR fixes an Azure Pipelines build OOM in the “Generate lists of telemetry events” step by increasing the Node.js old-space heap limit used when running @vscode/telemetry-extractor.
Changes:
- Introduces a shared
--max-old-space-size=8192Node option for the telemetry extractor runs. - Applies the heap option to both extractor invocations, with an explanatory comment documenting the build failure mode.
File summaries
| File | Description |
|---|---|
| build/azure-pipelines/common/extract-telemetry.ts | Adds a shared Node heap flag and uses it for both telemetry-extractor execSync calls to prevent V8 OOM during extraction. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Build failure
The
Generate lists of telemetry eventsbuild task crashed with a V8 out-of-memory error while running@vscode/telemetry-extractor:The crash occurred near ~2052 MB. The remaining failed tasks in the build (1ES verify + crash/log publish) were downstream cascades of the extractor never producing its output paths.
Root cause
build/azure-pipelines/common/extract-telemetry.tsinvokes the extractor with plainnode "${extractor}" ...and no heap flag, so it runs at V8's default ~2 GB old-space limit. The extractor loads telemetry declarations for the wholesourceDirtree into memory; as the tree grows it deterministically crosses that ceiling. This is a resource ceiling rather than a specific regression — no commit in the build window touches telemetry extraction.How the fix works
Both
nodeextractor invocations now pass--max-old-space-size=8192, raising the old-space heap to 8 GB and giving extraction headroom well above the previous ~2 GB crash point. The flag is defined once asextractorNodeOptionsand applied to both calls, with a comment documenting why. No behavior changes beyond the heap limit; telemetry output and error reporting are unchanged.Rollback evaluation
Recommendation: Do not roll back. Culprit commit/PR:
not confirmed— the failure is a deterministic build-tool heap ceiling, and the product commits in the build window do not touch telemetry extraction, so there is no code regression to revert. A bounded heap bump lands quickly and safely; a rollback would not address the OOM. Owners to consult:@joaomorenoValidation
Source inspection only. The change is confined to two shell command strings in a build script; the extractor binary and arguments are otherwise unchanged. CI validation happens when the telemetry extraction task runs in the pipeline. Local build/pipeline validation of this task was not run with the available tools.
Risk
Low. The only effect is a higher permitted heap for a short-lived build subprocess. No product code or runtime behavior is affected.
Recommended reviewer
Recommended owner:
@joaomorenoFixes microsoft/vscode-engineering#3836