-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support child_process in snapshot #50924
Comments
I think at the very least we can register some of the child process methods. Some additional work may be done to ensure that users don't leave any ProcessWrap lingering when the snapshot is taken too. |
@joyeecheung Is supposed for all unsupported modules to crash? I tried just
|
Not necessarily, they are crashing because they either have leftover wrapper objects that are not properly handled for the snapshot (could be a leak, even), or unregistered external references. Being unsupported means we haven't checked that they work in snapshot or make them to work in the snapshot, so they can fail in different ways, or work in some cases. |
PR-URL: #50943 Refs: #50924 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #50943 Refs: #50924 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #50943 Refs: #50924 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
These currently work in snapshot builder scripts. Asynchronous methods are not supported yet. PR-URL: #50943 Refs: #50924 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #50943 Refs: #50924 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #50943 Refs: #50924 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #50943 Refs: #50924 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
These currently work in snapshot builder scripts. Asynchronous methods are not supported yet. PR-URL: #50943 Refs: #50924 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #50943 Refs: #50924 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #50943 Refs: #50924 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #50943 Refs: #50924 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
These currently work in snapshot builder scripts. Asynchronous methods are not supported yet. PR-URL: #50943 Refs: #50924 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the
never-stale
|
The synchronous methods are supported since #50943 so the snippet in the OP works now and I am closing this. Asynchronous method support would be a different beast (I think as long as the method finishes and resources are cleaned up before snapshot is taken it should work, haven't verified it yet though). |
Version
21.1.0
Platform
Linux h4ad 5.15.0-89-generic #99~20.04.1-Ubuntu SMP Thu Nov 2 15:16:47 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
child_process
What steps will reproduce the bug?
The following code:
Run with:
node --snapshot-blob snapshot.blob --build-snapshot file.js
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
The snapshot being created without
core dumped
.isWhat do you see instead?
Additional information
Found at https://github.com/mehulkar/bench-childprocess
The text was updated successfully, but these errors were encountered: