You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform: Darwin -myhostname- 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:31 PDT 2021; root:xnu-7195.121.3~9/RELEASE_ARM64_T8101 arm64
Subsystem: v8 module
What steps will reproduce the bug?
Not sure about exact steps, but I think running puppeteer (running here 5 browser instances) and while it is running, invoke v8.getHeapSnapshot() by signal - doesn't matter which one, as long as you ignore it's side effect or that it does not change stuff. In my scenario the tested signals were SIGUSR1, SIGCONT, SIGWINCH.
So a pseudocode would look like this:
// ... run puppeteer code in backgroundconstv8=require('v8');process.on('SIGUSR1',()=>{constsnapshotStream=v8.getHeapSnaphshot();// ... should crash right about here ...})
How often does it reproduce? Is there a required condition?
Once signal is sent to the process, I guess any other trigger will cause the same effect.
What is the expected behavior?
A successfully generated heap snapshot stream which can later be written to some I/O.
My theory is that because there are chrome instances running in the background, whether in child processes or wherever, the function v8.getHeapSnapshot() thinks node has more memory space than it actually has.
The text was updated successfully, but these errors were encountered:
Have you tried running this on a newer release of Node.js? What kind of puppeteer code do you run?
It is difficult to tell from the stack trace what operation triggers the SIGSEGV, it may be more informative if you can configure your system to generate a coredump when it crashes so that it's possible to see exactly where it crashed.
What steps will reproduce the bug?
Not sure about exact steps, but I think running puppeteer (running here 5 browser instances) and while it is running, invoke v8.getHeapSnapshot() by signal - doesn't matter which one, as long as you ignore it's side effect or that it does not change stuff. In my scenario the tested signals were SIGUSR1, SIGCONT, SIGWINCH.
So a pseudocode would look like this:
How often does it reproduce? Is there a required condition?
Once signal is sent to the process, I guess any other trigger will cause the same effect.
What is the expected behavior?
A successfully generated heap snapshot stream which can later be written to some I/O.
What do you see instead?
zsh: segmentation fault
But in order to get more details I used the segfault-handler package (https://www.npmjs.com/package/segfault-handler):
Additional information
My theory is that because there are chrome instances running in the background, whether in child processes or wherever, the function
v8.getHeapSnapshot()
thinks node has more memory space than it actually has.The text was updated successfully, but these errors were encountered: