Skip to content

Conversation

@Trott
Copy link
Member

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), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test benchmark child_process

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
@TrottTrott added benchmark Issues and PRs related to the benchmark subsystem. child_process Issues and PRs related to the child_process subsystem. test Issues and PRs related to the tests. windows Issues and PRs related to the Windows platform. labels Apr 26, 2017
@nodejs-github-botnodejs-github-bot added benchmark Issues and PRs related to the benchmark subsystem. child_process Issues and PRs related to the child_process subsystem. labels Apr 26, 2017
@Trott
Copy link
MemberAuthor

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

@Trott
Copy link
MemberAuthor

/cc @bzoz (who proposed the fix in #12560 (comment))

@Trott
Copy link
MemberAuthor

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}`);
Copy link
Contributor

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?

Copy link
Contributor

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

@refack
Copy link
Contributor

how about using child_process.execFile(file[, args][, options][, callback]) in line 25 instead of exec
I know it changes the benchmark, but isn't it a better surrogate?

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}`);
Copy link
Contributor

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

@refack
Copy link
Contributor

Best solution would be to use something less crazy then yes

Trott added a commit to Trott/io.js that referenced this pull request Apr 28, 2017
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 <[email protected]> Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: James M Snell <[email protected]>
@Trott
Copy link
MemberAuthor

Landed in a1a54ca.

@TrottTrott closed this Apr 28, 2017
@evanlucasevanlucas mentioned this pull request May 1, 2017
evanlucas pushed a commit that referenced this pull request May 1, 2017
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 <[email protected]> Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: James M Snell <[email protected]>
evanlucas pushed a commit that referenced this pull request May 2, 2017
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 <[email protected]> Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: James M Snell <[email protected]>
evanlucas pushed a commit that referenced this pull request May 2, 2017
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 <[email protected]> Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: James M Snell <[email protected]>
evanlucas pushed a commit that referenced this pull request May 3, 2017
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 <[email protected]> Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: James M Snell <[email protected]>
refack added a commit to refack/node that referenced this pull request May 4, 2017
@refackrefack mentioned this pull request May 4, 2017
2 tasks
refack added a commit to refack/node that referenced this pull request May 6, 2017
PR-URL: nodejs#12821Fixes: nodejs#12817 Refs: nodejs#12658 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]>
@gibfahn
Copy link
Member

gibfahn commented May 15, 2017

Should this be backported to v6.x?

@Trott
Copy link
MemberAuthor

Should this be backported to v6.x?

Yes assuming the relevant benchmark exists there etc.

gibfahn pushed a commit that referenced this pull request May 16, 2017
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 <[email protected]> Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request May 18, 2017
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 <[email protected]> Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: James M Snell <[email protected]>
anchnk pushed a commit to anchnk/node that referenced this pull request May 19, 2017
PR-URL: nodejs#12821Fixes: nodejs#12817 Refs: nodejs#12658 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request May 23, 2017
gibfahn pushed a commit that referenced this pull request Jun 20, 2017
PR-URL: #12821Fixes: #12817 Refs: #12658 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2017
PR-URL: #12821Fixes: #12817 Refs: #12658 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]>
andrew749 pushed a commit to michielbaird/node that referenced this pull request Jul 19, 2017
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 <[email protected]> Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: James M Snell <[email protected]>
@TrottTrott deleted the flaky-benchmark-fix branch January 13, 2022 22:45
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmarkIssues and PRs related to the benchmark subsystem.child_processIssues and PRs related to the child_process subsystem.testIssues and PRs related to the tests.windowsIssues and PRs related to the Windows platform.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@Trott@refack@gibfahn@jasnell@bzoz@MylesBorins@nodejs-github-bot