Skip to content
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

child_process._forkChild results in an abort #32941

Closed
zyscoder opened this issue Apr 20, 2020 · 2 comments
Closed

child_process._forkChild results in an abort #32941

zyscoder opened this issue Apr 20, 2020 · 2 comments
Labels
wontfix Issues that will not be fixed.

Comments

@zyscoder
Copy link

  • Version: v12.16.0
  • Platform: Linux vul337 4.15.0-91-generic new design of error handling #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem: child_process

What steps will reproduce the bug?

Save the following code in a file:

// temp.js
try { 
    require('child_process')._forkChild(3); 
} catch (e) { }

then run the code:

path/to/node temp.js

Note that the try-catch block cannot be removed, otherwise the abort would not be triggered.
And, only some parameter for '_forkChild' can trigger an abort. In my practice, 3, 6, 8, and 9 do.

How often does it reproduce? Is there a required condition?

Saving the code in a file and running it by passing as command line parameter can trigger this abort, but directly running the code in an interactive way would not.

What is the expected behavior?

If any error occurs, an exception or other similar error-reporting stuff should be thrown. There is no reason to abort for the whole node process.

What do you see instead?

> path/to/node temp.js                                                      
[1]    18843 abort      path/to/node temp.js

Additional information

@rickyes
Copy link
Contributor

rickyes commented Apr 20, 2020

I checked child_process. _forkChild is not a public API, only for internal use.

@himself65
Copy link
Member

I agree with @rickyes, I think it hasn't good benefits to check value for an unpublic API cause it will decrease the performance. and our node.js core wouldn't pass the invalid value for these API

@himself65 himself65 added the wontfix Issues that will not be fixed. label Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Issues that will not be fixed.
Projects
None yet
Development

No branches or pull requests

3 participants