Skip to content

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
microsoft:mainfrom
vscodebot-pr:fix/telemetry-extractor-heap-oom-aw-34511565314
Draft

fix: raise telemetry-extractor heap limit to prevent build OOM (build fix for vscode-engineering#3836)#335527
VS Code PR Bot (vscodebot-pr) wants to merge 1 commit into
microsoft:mainfrom
vscodebot-pr:fix/telemetry-extractor-heap-oom-aw-34511565314

Conversation

@vscodebot-pr

Copy link
Copy Markdown
Contributor

Build failure

The Generate lists of telemetry events build task crashed with a V8 out-of-memory error while running @vscode/telemetry-extractor:

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

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.ts invokes the extractor with plain node "${extractor}" ... and no heap flag, so it runs at V8's default ~2 GB old-space limit. The extractor loads telemetry declarations for the whole sourceDir tree 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 node extractor 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 as extractorNodeOptions and 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: @joaomoreno

Validation

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: @joaomoreno

Fixes microsoft/vscode-engineering#3836

Generated by build-fix · opus48 · 179.7 AIC · ⌖ 12.5 AIC · ⊞ 10.2K ·

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 AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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=8192 Node 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vscode-build VS Code build process issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants