Node.js encountered a crash code (3221226505) in a specific scenario on the Windows platform, which appeared to be a stack overflow.
Node.js Version
v22.21.1
NPM Version
10.9.4
Operating System
Windows 11 25H2
Subsystem
Other
Description
Related issue: https://github.com/adonisjs/logger/issues/71#issuecomment-3605828977
Vite uses Rollup as its packaging tool; however, Rollup has some platform-specific binaries that can cause stack overflows in Node.js on Windows, which in turn can cause AdonisJS's HMR development server to crash silently.
I used the command $env:NODE_DEBUG="*"; node ace serve --hmr *> debug.log to output the complete Node.js debug log, but I only got the exit code 3221226505, and I couldn't see any other useful information.
I'd like to know if there's a way to get deeper levels of the crash logs for debugging purposes.
Similar Issues:
- https://github.com/electron/electron/issues/34539
- https://stackoverflow.com/questions/63091240/npm-run-watch-exit-status-3221226505
- https://luojia.me/8574/
Minimal Reproduction
No response
Output
...
ESM 25388: async addJobsToDependencyGraph() file:///C:/Users/user/Desktop/helloworld/node_modules/vite/dist/node/index.js ModuleJob {
importAttributes: [Object: null prototype] {},
isMain: false,
inspectBrk: false,
url: 'node:path',
modulePromise: Promise { ModuleWrap { url: 'node:path' } },
linked: Promise { [Array(0): null prototype] [] },
instantiated: Promise { undefined },
module: ModuleWrap { url: 'node:path' }
}
ESM 25388: Loading CJSModule file:///C:/Users/user/Desktop/helloworld/node_modules/rollup/dist/native.js
MODULE 25388: looking for "C:\\Users\\user\\Desktop\\helloworld\\node_modules\\rollup\\dist\\native.js" in ["C:\\Users\\user\\.node_modules","C:\\Users\\user\\.node_libraries","C:\\nvm4w\\nodejs\\lib\\node"]
MODULE 25388: load "C:\\Users\\user\\Desktop\\helloworld\\node_modules\\rollup\\dist\\native.js" for module "C:\\Users\\user\\Desktop\\helloworld\\node_modules\\rollup\\dist\\native.js"
MODULE 25388: Module._load REQUEST node:fs parent: C:\Users\user\Desktop\helloworld\node_modules\rollup\dist\native.js
MODULE 25388: load built-in module fs
MODULE_TIMER 25388 [C:\Users\user\Desktop\helloworld\node_modules\rollup\dist\native.js] [node:fs]: 0.153ms
MODULE 25388: Module._load REQUEST node:path parent: C:\Users\user\Desktop\helloworld\node_modules\rollup\dist\native.js
MODULE 25388: load built-in module path
MODULE_TIMER 25388 [C:\Users\user\Desktop\helloworld\node_modules\rollup\dist\native.js] [node:path]: 0.192ms
MODULE 25388: Module._load REQUEST node:process parent: C:\Users\user\Desktop\helloworld\node_modules\rollup\dist\native.js
MODULE 25388: load built-in module process
MODULE_TIMER 25388 [C:\Users\user\Desktop\helloworld\node_modules\rollup\dist\native.js] [node:process]: 0.129ms
[15:17:02.185] [0] ✘ Command failed with exit code 3221226505: bin/server.js
[15:17:02.186] [0] ✘ (done in 3.8s)
ADONISJS:APP 24300: terminating app
POPPINSS:HOOKS 24300: running hooks
Before You Submit
- [x] I have looked for issues that already exist before submitting this
- [x] My issue follows the guidelines in the README file, and follows the 'How to ask a good question' guide at https://stackoverflow.com/help/how-to-ask
I'd like to know if there's a way to get deeper levels of the crash logs for debugging purposes.
NODE_DEBUG=* enables all of Node.js's debug logging. (Although, technically, you could compile the binary with additional breakpoints)
Perhaps rollup has its own debug environment commands?
It's likely that your process is just using too much memory. Try increasing the memory available and see if the error subsides
It's likely that your process is just using too much memory. Try increasing the memory available and see if the error subsides
I tried changing the command to node --max-old-space-size=16384 ace serve --hmr, but it didn't improve the problem.
Moreover, this doesn't always happen; it happens frequently, rather than not at all. This is a very strange problem.