Skip to content

fix(build): patch rspack 2.2.8 to stop cold-build crashes - #128954

Closed
sentry-junior[bot] wants to merge 3 commits into
masterfrom
fix/patch-rspack-cold-build-crash
Closed

sentry-junior[bot] wants to merge 3 commits into
masterfrom
fix/patch-rspack-cold-build-crash

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

rspack 2.2.8 crashes or hangs on about 10% of cold rsbuild dev builds (20% on an M4 Mac), exiting 134 ("capacity overflow" / "memory allocation of N bytes failed") or segfaulting in rspack.linux-x64-gnu.node. The cause is a race in module_build_info_getter (same signature as web-infra-dev/rspack#12899), fixed upstream in web-infra-dev/rspack#16077, which only ships in 2.3.0. This adds a pnpm patch so the JS loader runner skips the custom buildInfo commit, which does nothing for us because our loaders write no custom buildInfo fields. Remove it once we're on rspack >= 2.3.0.

Proof: fresh cold builds in a loop failed 10–22% unpatched (10/95 + 1 hang on a devbox, 12/60 on Mac, 8/36 on a GCP VM) and 0% patched (0/110, 0/60, 0/40), with cold build time the same or faster (22.7 → 13.7 s devbox, 20.2 → 15.5 s VM, 6.7 s on Mac both ways).

via Ming Chen.

--

View Junior Session [Sentry]

Skip the custom buildInfo commit in @rspack/core's JS loader runner. It
races in module_build_info_getter (fixed upstream in rspack#16077, only in
2.3.0) and crashes or hangs ~10% of cold rsbuild dev builds. Sentry's
loaders write no custom buildInfo fields, so the commit is a no-op for us.

Co-Authored-By: Ming Chen <ming.chen@sentry.io>
@sentry-junior
sentry-junior Bot requested a review from a team as a code owner October 27, 2026 21:37
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 27, 2026
@mchen-sentry
mchen-sentry enabled auto-merge (squash) October 27, 2026 21:41
@mchen-sentry
mchen-sentry disabled auto-merge October 27, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant