Crash during vite build due to something like infinite loop eating all of the available memory #15288
Closed
7 tasks done
Labels
duplicate
This issue or pull request already exists
Describe the bug
First of all I've checked #2433, because of OOM error. And none of the workarounds are worked. And looks like it is completely different case. Everything points to that during build vite running into some kind of infinite loop eating all of the available memory, no matter how much you supply, and build ends up with vite node process OOM crash.
Problem is reproducible even in the simple almost empty template project using couple of cubing library submodules/functions. I wondering what in this library can cause such problem with vite.
Can't localize for now, vite build does not produce any of detailed logs during build even if
--debug
option is supplied. Any suggestions how to trace/debug vite build is appreciated. Already tried to make heap snapshots and V8 profiling, but at this point not all clear for me there:Reproduction
https://stackblitz.com/edit/vite-oom-test
Steps to reproduce
Create simple project from template:
Install cubing module from npm:
Replace
main.ts
with simple usage of that part of cubing library which causes problem:Increase heap size in node as much as possible:
Run vite build and expect infinite loop eating all of the available memory following with OOM crash:
System Info
System: OS: macOS 12.7.1 CPU: (8) x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz Memory: 4.75 GB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 20.10.0 - /usr/local/bin/node npm: 10.2.3 - /usr/local/bin/npm Browsers: Chrome: 120.0.6099.62 Safari: 17.1.2 npmPackages: vite: ^5.0.0 => 5.0.6
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: