-
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
benchmark: terminate child process on Windows #12658
Conversation
test-benchmark-child-process failures reveal that child-process-exec-stdout benchmark sometimes leaves around a stray yes.exe process. Add code to terminate the process. Refs: nodejs#12560
CI stress test on master branch showing failures: https://ci.nodejs.org/job/node-stress-single-test/nodes=win2016-1p/1171/console CI stress test on this branch showing success: https://ci.nodejs.org/job/node-stress-single-test/1174/nodes=win2016-1p/console |
/cc @bzoz (who proposed the fix in #12560 (comment)) |
bench.end(bytes); | ||
if (process.platform === 'win32') { | ||
// Sometimes there's a yes.exe process left hanging around on Windows... | ||
child_process.execSync(`taskkill /f /t /pid ${child.pid}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the best way to do it, it seems so cruel 😭
Now seriously, child.kill
should work, aren't we masking a real problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NM, yes.exe
is a ported unix util, it's probably crazy
how about using |
bench.end(bytes); | ||
if (process.platform === 'win32') { | ||
// Sometimes there's a yes.exe process left hanging around on Windows... | ||
child_process.execSync(`taskkill /f /t /pid ${child.pid}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NM, yes.exe
is a ported unix util, it's probably crazy
Best solution would be to use something less crazy then |
test-benchmark-child-process failures reveal that child-process-exec-stdout benchmark sometimes leaves around a stray yes.exe process. Add code to terminate the process. PR-URL: nodejs#12658 Ref: nodejs#12560 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in a1a54ca. |
test-benchmark-child-process failures reveal that child-process-exec-stdout benchmark sometimes leaves around a stray yes.exe process. Add code to terminate the process. PR-URL: #12658 Ref: #12560 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com>
test-benchmark-child-process failures reveal that child-process-exec-stdout benchmark sometimes leaves around a stray yes.exe process. Add code to terminate the process. PR-URL: #12658 Ref: #12560 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com>
test-benchmark-child-process failures reveal that child-process-exec-stdout benchmark sometimes leaves around a stray yes.exe process. Add code to terminate the process. PR-URL: #12658 Ref: #12560 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com>
test-benchmark-child-process failures reveal that child-process-exec-stdout benchmark sometimes leaves around a stray yes.exe process. Add code to terminate the process. PR-URL: #12658 Ref: #12560 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#12821 Fixes: nodejs#12817 Refs: nodejs#12658 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Should this be backported to v6.x? |
Yes assuming the relevant benchmark exists there etc. |
test-benchmark-child-process failures reveal that child-process-exec-stdout benchmark sometimes leaves around a stray yes.exe process. Add code to terminate the process. PR-URL: #12658 Ref: #12560 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com>
test-benchmark-child-process failures reveal that child-process-exec-stdout benchmark sometimes leaves around a stray yes.exe process. Add code to terminate the process. PR-URL: #12658 Ref: #12560 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#12821 Fixes: nodejs#12817 Refs: nodejs#12658 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
test-benchmark-child-process failures reveal that child-process-exec-stdout benchmark sometimes leaves around a stray yes.exe process. Add code to terminate the process. PR-URL: nodejs/node#12658 Ref: nodejs/node#12560 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com>
test-benchmark-child-process failures reveal that
child-process-exec-stdout benchmark sometimes leaves around a stray
yes.exe process. Add code to terminate the process.
Refs: #12560
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test benchmark child_process