Uh oh!
There was an error while loading. Please reload this page.
vm: fix nested timeouts with inverse order + fix flaky test-vm-timeout - #7373
vm: fix nested timeouts with inverse order + fix flaky test-vm-timeout#7373addaleax wants to merge 3 commits into
Conversation
addaleax
commented
Jun 22, 2016
There was a problem hiding this comment.
IMHO it would look better to have these as separate declarations.
There was a problem hiding this comment.
Changed it to separate declarations
Green! The CI is green again! I'm reluctant to review C++ parts of Node.js (even though this looks pretty straightforward) and I'll leave that to people infinitely more familiar with Node.js's C++ pieces. But 💯 on having a fix for this! 🎉 🎈 ✨ |
mscdex
commented
Jun 22, 2016
If this is fixing the flaky test, there should be a commit that removes the flaky status too. |
93dc504 to
37ca1ddCompareaddaleax
commented
Jun 22, 2016
Updated + added revert of #7359 |
There was a problem hiding this comment.
Not a comment but an observation: it's not necessary to rethrow when calling ThrowError() (although it doesn't hurt either - ThrowException() silently updates the TryCatch exception) but it might be confusing to the casual reader what exactly gets rethrown.
There was a problem hiding this comment.
@bnoordhuis Not sure I’m completely understanding you – the ReThrow() is necessary because otherwise the TryCatch would catch the Script execution timed out/interrupted errors.
But you’re right, it might be a good idea to explicitly state what exactly is thrown here, I’m adding a comment.
bnoordhuis
commented
Jun 22, 2016
LGTM with two suggestions. |
37ca1dd to
71d0dc7Compareaddaleax
commented
Jun 22, 2016
Trott
commented
Jun 23, 2016
Looks like you did them right to me. |
There was a problem hiding this comment.
Could this just be an if - else if instead of nested ifs?
cjihrig
commented
Jun 23, 2016
LGTM with one small comment. |
Likely fix the flaky parallel/test-vm-timeout. Increase the outer timeout in the test checking for nested timeouts with `vm` scripts so that its firing won’t interfere with the inner timeout. Fixes: nodejs#6727
When a vm script aborted after a timeout/signal interruption, test whether the local timeout/signal watchdog was responsible for terminating the execution. Without this, when a shorter timer from an outer `vm.run*` invocation fires before an inner timeout, the inner timeout would throw an error instead of the outer one, but because it did not witness the timeout itself, it would assume the termination was the result of a signal interruption.
This reverts commit f34caa9.
71d0dc7 to
ce5f4dcCompareaddaleax
commented
Jun 25, 2016
One more CI: https://ci.nodejs.org/job/node-test-commit/3845/ |
addaleax
commented
Jun 25, 2016
Likely fix the flaky parallel/test-vm-timeout. Increase the outer timeout in the test checking for nested timeouts with `vm` scripts so that its firing won’t interfere with the inner timeout. Fixes: #6727 PR-URL: #7373 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
When a vm script aborted after a timeout/signal interruption, test whether the local timeout/signal watchdog was responsible for terminating the execution. Without this, when a shorter timer from an outer `vm.run*` invocation fires before an inner timeout, the inner timeout would throw an error instead of the outer one, but because it did not witness the timeout itself, it would assume the termination was the result of a signal interruption. PR-URL: #7373 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Likely fix the flaky parallel/test-vm-timeout. Increase the outer timeout in the test checking for nested timeouts with `vm` scripts so that its firing won’t interfere with the inner timeout. Fixes: #6727 PR-URL: #7373 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
When a vm script aborted after a timeout/signal interruption, test whether the local timeout/signal watchdog was responsible for terminating the execution. Without this, when a shorter timer from an outer `vm.run*` invocation fires before an inner timeout, the inner timeout would throw an error instead of the outer one, but because it did not witness the timeout itself, it would assume the termination was the result of a signal interruption. PR-URL: #7373 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Likely fix the flaky parallel/test-vm-timeout. Increase the outer timeout in the test checking for nested timeouts with `vm` scripts so that its firing won’t interfere with the inner timeout. Fixes: #6727 PR-URL: #7373 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
When a vm script aborted after a timeout/signal interruption, test whether the local timeout/signal watchdog was responsible for terminating the execution. Without this, when a shorter timer from an outer `vm.run*` invocation fires before an inner timeout, the inner timeout would throw an error instead of the outer one, but because it did not witness the timeout itself, it would assume the termination was the result of a signal interruption. PR-URL: #7373 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins
commented
Jul 11, 2016
@addaleax lts? |
addaleax
commented
Jul 11, 2016
@thealphanerd Yes, but only the |
MylesBorins
commented
Jul 11, 2016
sounds a bit convoluted... would you be able to send a backport PR? |
Likely fix the flaky parallel/test-vm-timeout. Increase the outer timeout in the test checking for nested timeouts with `vm` scripts so that its firing won’t interfere with the inner timeout. Fixes: nodejs#6727 PR-URL: nodejs#7373 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This reverts commit f34caa9. PR-URL: nodejs#7373 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Likely fix the flaky parallel/test-vm-timeout. Increase the outer timeout in the test checking for nested timeouts with `vm` scripts so that its firing won’t interfere with the inner timeout. Fixes: #6727 PR-URL: #7373 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Likely fix the flaky parallel/test-vm-timeout. Increase the outer timeout in the test checking for nested timeouts with `vm` scripts so that its firing won’t interfere with the inner timeout. Fixes: #6727 PR-URL: #7373 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Likely fix the flaky parallel/test-vm-timeout. Increase the outer timeout in the test checking for nested timeouts with `vm` scripts so that its firing won’t interfere with the inner timeout. Fixes: #6727 PR-URL: #7373 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Likely fix the flaky parallel/test-vm-timeout. Increase the outer timeout in the test checking for nested timeouts with `vm` scripts so that its firing won’t interfere with the inner timeout. Fixes: #6727 PR-URL: #7373 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Checklist
make -j4 test(UNIX) orvcbuild test nosign(Windows) passesAffected core subsystem(s)
vm, test
Description of change
Fix#6727:
test-vm-timeoutwas flaky even before vm,repl: (add ability to) break on sigint/ctrl+c #6635 is that the outer timeout could interfere with handling of the inner timeout, e.g. during construction of theErrorobject that would be created. Increasing the outer timeout won’t have any adverse effects anyway./cc @bnoordhuis ?