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 flaky inspector-stop-profile-after-done #18126

Closed
wants to merge 25 commits into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Jan 12, 2018

In test/sequential/test-inspector-stop-profile-after-done.js, start the
profiler before running the code to avoid a race condition. If
Profile.start is received after the debugger is waiting to disconnect,
then the process will not terminate.

Fixes: #16772

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test inspector

@Trott Trott added wip Issues and PRs that are still a work in progress. test Issues and PRs related to the tests. inspector Issues and PRs related to the V8 inspector protocol flaky-test Issues and PRs related to the tests with unstable failures on the CI. labels Jan 12, 2018
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jan 12, 2018
@Trott
Copy link
Member Author

Trott commented Jan 12, 2018

Stress test showing failure on master:
https://ci.nodejs.org/job/node-stress-single-test/1682/nodes=pi1-raspbian-wheezy/console

Stress test for this pull request:
https://ci.nodejs.org/job/node-stress-single-test/1685/nodes=pi1-raspbian-wheezy/console

UPDATE: Failures still happening. Bummer.

@apapirovski
Copy link
Member

apapirovski commented Jan 12, 2018

Doesn't this get rid of the one line that's actually being tested? Edit by @apapirovski: This can now be ignored.

[EDIT by @Trott: This comment is not applicable any more as the change has completely morphed into something different. Just don't want people to be confused to think that it applies to the fix that is currently there now or the message explaining it above that has been completely changed since the original posting.]

@Trott Trott force-pushed the fix-flaky-inspector branch 3 times, most recently from 45d9aaa to 3e42d89 Compare January 23, 2018 16:56
@Trott
Copy link
Member Author

Trott commented Jan 23, 2018

So, this is kind of interesting. The same exact branch on two different Pi 1 devices takes radically different amounts of time to run the test.

Here's test-requireio_securogroup-debian7-arm_pi1p-1 taking about 13 seconds to run the test and (so far, at least) never timing out: https://ci.nodejs.org/job/node-stress-single-test/1752/nodes=pi1-raspbian-wheezy/console

Here's the exact same branch running on test-requireio_mhdawson-debian7-arm_pi1p-1 and taking about 90 seconds to run the test and timing out here and there: https://ci.nodejs.org/job/node-stress-single-test-pi1-binary/31/label=pi1-raspbian-wheezy/console

@nodejs/build (particularly @rvagg) any idea what the cause of the disparity might be?

EDIT: Further testing seems to reveal that it gets way slower after the first failure. So the test will take 13 seconds or so an a Pi 1 until there's a timeout. Then it will take more like 90 seconds. But there doesn't seem to be a stale process, or at least not one I noticed. Maybe there is but my ps/grep is not finding it? Anyway, that's at least slightly less of a mystery, perhaps.

@rvagg
Copy link
Member

rvagg commented Jan 23, 2018

Wow, big difference. It could be that test-requireio_mhdawson-debian7-arm_pi1p-1 was having trouble at the time, maybe some background work that wasn't killed from a previous run. It could also be that test-requireio_mhdawson-debian7-arm_pi1p-1 genuinely has problems, it's one of the Pi's that I have repeated problems with—although not enough to pull it entirely.

@rvagg
Copy link
Member

rvagg commented Jan 23, 2018

Actually, the links you've provided indicate that they're now working at roughly the same level, the former in the 60-70 range and the latter in the 70-80 range. Maybe it's some kind of warm-up thing?

@Trott
Copy link
Member Author

Trott commented Jan 23, 2018

Actually, the links you've provided indicate that they're now working at roughly the same level, the former in the 60-70 range and the latter in the 70-80 range. Maybe it's some kind of warm-up thing?

Yipes! Interesting... Also, they're both showing failures too.

@BridgeAR
Copy link
Member

BridgeAR commented Feb 1, 2018

Ping @Trott

@Trott
Copy link
Member Author

Trott commented Feb 2, 2018

Ping @Trott

I'm stumped for now.

@Trott
Copy link
Member Author

Trott commented Feb 2, 2018

Oh, I just had a blast-from-the-past memory about a similar problem and I now think I know what might be going on...

@Trott
Copy link
Member Author

Trott commented Feb 2, 2018

@Trott
Copy link
Member Author

Trott commented Feb 2, 2018

Hmmm, build failure on the stress test. Let's try the fanned stress test instead: https://ci.nodejs.org/view/All/job/node-stress-single-test-pi1-fanned/33/

And for comparison, here's master:
https://ci.nodejs.org/view/All/job/node-stress-single-test-pi1-fanned/34/

@Trott Trott force-pushed the fix-flaky-inspector branch 2 times, most recently from a9b3589 to 507e811 Compare February 7, 2018 20:56
@Trott
Copy link
Member Author

Trott commented Feb 7, 2018

@Trott
Copy link
Member Author

Trott commented Feb 8, 2018

So far, this latest change looks like it fixes it.

Stress test: https://ci.nodejs.org/job/node-stress-single-test-pi1-binary/40/label=pi1-raspbian-wheezy/console

@Trott Trott force-pushed the fix-flaky-inspector branch 2 times, most recently from bc2d911 to cbea82d Compare February 8, 2018 18:14
@Trott Trott removed the wip Issues and PRs that are still a work in progress. label Feb 8, 2018
@Trott
Copy link
Member Author

Trott commented Mar 2, 2018

Stress test is green! https://ci.nodejs.org/job/node-stress-single-test-pi1-binary/83/label=pi1-raspbian-wheezy/

Removing in-progress flag.

@Trott Trott removed the wip Issues and PRs that are still a work in progress. label Mar 2, 2018
@Trott
Copy link
Member Author

Trott commented Mar 2, 2018

Copy link
Member

@apapirovski apapirovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. Thanks for continuing to work on this and finally resolving it, @Trott!

Trott added a commit to Trott/io.js that referenced this pull request Mar 2, 2018
Use common.platformTimeout() to give longer durations to Raspberry Pi
devices to make test more reliable.

PR-URL: nodejs#18126
Fixes: nodejs#16772
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Eugene Ostroukhov <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@Trott
Copy link
Member Author

Trott commented Mar 2, 2018

Landed in 81d73fe

@Trott Trott closed this Mar 2, 2018
addaleax pushed a commit to addaleax/node that referenced this pull request Mar 5, 2018
Use common.platformTimeout() to give longer durations to Raspberry Pi
devices to make test more reliable.

PR-URL: nodejs#18126
Fixes: nodejs#16772
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Eugene Ostroukhov <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Mar 6, 2018
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
Use common.platformTimeout() to give longer durations to Raspberry Pi
devices to make test more reliable.

PR-URL: nodejs#18126
Fixes: nodejs#16772
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Eugene Ostroukhov <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Aug 17, 2018
Use common.platformTimeout() to give longer durations to Raspberry Pi
devices to make test more reliable.

PR-URL: #18126
Fixes: #16772
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Eugene Ostroukhov <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Aug 17, 2018
@Trott Trott deleted the fix-flaky-inspector branch January 13, 2022 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky-test Issues and PRs related to the tests with unstable failures on the CI. inspector Issues and PRs related to the V8 inspector protocol test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flake: sequential/test-inspector-stop-profile-after-done
9 participants