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

AIX: test-child-process-pass-fd.js processes still running #9255

Closed
mhdawson opened this issue Oct 24, 2016 · 4 comments
Closed

AIX: test-child-process-pass-fd.js processes still running #9255

mhdawson opened this issue Oct 24, 2016 · 4 comments
Labels
child_process Issues and PRs related to the child_process subsystem. test Issues and PRs related to the tests.

Comments

@mhdawson
Copy link
Member

  • Version: master
  • Platform: AIX
  • Subsystem: test

Looks like test-child-process-pass-fd.js is leaving processes behind on AIX. We were seeing failures in other tests runs due to fork failing and this may be related.

@mhdawson
Copy link
Member Author

They all seemed to be from Oct 21st so possibly from a stress run ? There were also no processes hanging around on test-osuosl-aix61-ppc64_be-1

@mhdawson
Copy link
Member Author

Latest run seems ok after I cleaned up the machine. Will leave this open and check if we see re-occurrences of the processes hanging around over the next few days.

@sam-github
Copy link
Contributor

I confirmed that test leaks child processes on unexpected exit of the parent by throwing after 30 workers (simulating a fork failure). So, if fork fails and errors part way through the 80 children, the parent will exit, and workers will leak.

I tried to fix this in the child with the process.on('disconnect', ()=> process.exit(1)) trick, no luck, I'll try something else.

@mscdex mscdex added child_process Issues and PRs related to the child_process subsystem. test Issues and PRs related to the tests. labels Oct 24, 2016
@sam-github
Copy link
Contributor

I suspect that the process.on('disconnect', ... was not working because AIX doesn't schedule time for its children to run after being forked if the parent is still busy. I refed the IPC channel (and unrefed the sockets) instead.

@mhdawson Maybe #9257 will fix this.

sam-github added a commit to sam-github/node that referenced this issue Oct 27, 2016
test-child-process-pass-fd.js parent can exit with an error on failure
to fork, in which case it will leak child processes. Limit child
lifetime to that of parent.

Fixes: nodejs#9255
PR-URL: nodejs#9257
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
evanlucas pushed a commit that referenced this issue Nov 3, 2016
test-child-process-pass-fd.js parent can exit with an error on failure
to fork, in which case it will leak child processes. Limit child
lifetime to that of parent.

Fixes: #9255
PR-URL: #9257
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Nov 17, 2016
test-child-process-pass-fd.js parent can exit with an error on failure
to fork, in which case it will leak child processes. Limit child
lifetime to that of parent.

Fixes: #9255
PR-URL: #9257
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Nov 19, 2016
test-child-process-pass-fd.js parent can exit with an error on failure
to fork, in which case it will leak child processes. Limit child
lifetime to that of parent.

Fixes: #9255
PR-URL: #9257
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
child_process Issues and PRs related to the child_process subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

No branches or pull requests

3 participants