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

test: fix infinite spawn cycle in stdio test #948

Merged
merged 1 commit into from
Feb 25, 2015

Conversation

bnoordhuis
Copy link
Member

Fix parallel/test-stdio-closed introduced in commit b5f25a9 ("src:
ensure that file descriptors 0-2 are valid") to not keep spawning
child processes ad infinitum.

The test spawns itself as a child process but a missing return statement
made the child process spawn itself again, and again, and again.

It went unnoticed for some time because the child process exits almost
immediately afterwards, i.e. it didn't fill up the process table. The
observable effect was an iojs process that was quietly consuming CPU
cyles in the background with a PID that was constantly changing.

Refs: #938

R=@indutny

https://jenkins-iojs.nodesource.com/view/iojs/job/iojs+any-pr+multi/194/

@indutny
Copy link
Member

indutny commented Feb 25, 2015

Oh god, LGTM

Fix parallel/test-stdio-closed introduced in commit b5f25a9 ("src:
ensure that file descriptors 0-2 are valid") to not keep spawning
child processes ad infinitum.

The test spawns itself as a child process but a missing return statement
made the child process spawn itself again, and again, and again.

It went unnoticed for some time because the child process exits almost
immediately afterwards, i.e. it didn't fill up the process table.  The
observable effect was an iojs process that was quietly consuming CPU
cyles in the background with a PID that was constantly changing.

Refs: nodejs#938
PR-URL: nodejs#948
Reviewed-By: Fedor Indutny <fedor@indutny.com>
@bnoordhuis bnoordhuis closed this Feb 25, 2015
@bnoordhuis bnoordhuis deleted the issue938 branch February 25, 2015 10:14
@bnoordhuis bnoordhuis merged commit 506c7fd into nodejs:v1.x Feb 25, 2015
@bnoordhuis
Copy link
Member Author

The CI matrix isn't 100% green (well, blue) but the failures look unrelated to this PR. Another PR I have open also sees a lot of spurious failures so I'm chalking it up to CI instability.

@cjihrig
Copy link
Contributor

cjihrig commented Feb 25, 2015

Thanks Ben. I experienced this problem on my machine after running the tests recently.

@rvagg rvagg mentioned this pull request Feb 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants