The Wire · Showcase
TURBOPACK FIXES DEADLOCK THAT COULD HANG YOUR BUILDS
By RepoJournal · Filed · About Vercel
Luke Sandberg patched a critical threading bug in turbopack's scope_and_block primitive that could cause builds to hang under load.
The fix routes all jobs through a single shared work queue instead of spawning exclusive worker tasks [1], eliminating a race condition where completion depended on scheduler timing. In parallel, Sandberg removed the synthetic turbopack-build-events trace span and simplified tracing to use `next build` as the parent, making trace reporting more reliable since spans no longer report zero duration [2]. Separately, Sam Poder closed a hole where constants with values referencing other values were incorrectly treated as side-effect free, a regression from earlier this year that could have broken optimizations [3]. Across the stack, 5 commits and 4 PRs landed in a single release cycle.
One email a day. Unsubscribe in one click.
Keep up with Vercel in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Pull the latest next.js from main to get the scope_and_block deadlock fix in your local builds vercel/next.js [immediate]
- → Monitor your build traces in production to confirm span reporting is cleaner post-simplification vercel/next.js [monitor]
References
- [1] [turbopack] Fix a potential deadlock in scope_and_block ↗ vercel/next.js
- [2] Remove the turbopack-build-events trace span, use `next build` instead (#96746) vercel/next.js
- [3] [turbopack] Treat constants with values referencing other values as unsafe (#96190) vercel/next.js