-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: run abort tests #14013
test: run abort tests #14013
Conversation
tools/test.py
Outdated
|
||
from os.path import join, dirname, abspath, basename, isdir, exists | ||
from datetime import datetime | ||
from Queue import Queue, Empty | ||
|
||
resource.setrlimit(resource.RLIMIT_CORE, (0,0)) |
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.
I'm thinking specialize SimpleTestConfiguration
and do it there.
Maybe we'll want a test that examines the core-dump and deletes it?
Also there was an issue where we wanted the core for post-mortem...
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.
Also there was an issue where we wanted the core for post-mortem...
Fwiw, we’d still need to configure the machines to actually store them in order to do that.
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.
Found it: #13227
apparently the smartOS
machines are configured
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.
I'm thinking specialize SimpleTestConfiguration and do it there.
I'd do it in test/abort/testcfg.py.
edit: hm, or not. It still affects multi-suite runs (tools/test.py abort addon
) so it's not materially different from the current pull request.
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.
edit: hm, or not. It still affects multi-suite runs (tools/test.py abort addon) so it's not materially different from the current pull request.
Hmmm test.TestConfiguration
doesn't have an end hook 😕
Edit: could put it last in the list in Makefile
and vcbuild.bat
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.
If you set both the hard and the soft limit (what this PR does), it's permanent; you can't change the limit back again in the same process.
Edit: could put it last in the list in Makefile and vcbuild.bat
Seems a little fragile. Better always X than sometimes X, sometimes Y, depending on how it's invoked.
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.
If you set both the hard and the soft limit (what this PR does), it's permanent; you can't change the limit back again in the same process.
Did not know that...
Seems a little fragile. Better always X than sometimes X, sometimes Y, depending on how it's invoked.
Ack.
So trying to be creative
- maybe change
Makefile
/vcbuild
to run theabout
suite in a subsequentpython
invocation - or make the new
test.AbortTestConfiguration
spawn a child process...
I want my cake and eat it too...
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.
I took a few tentative steps towards using preexec_fn
in the subprocess.Popen()
call so that the resource limit only applies when needed, but my Python is not-so-good and I ran into not being sure how to get the necessary configuration indicators passed from the (will have to create it) AbortTestConfiguration
.
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.
I can take over if you want but what you have now is Good Enough, IMO. Threading through the ulimit setting from test/abort/testcfg.py to subprocess.Popen() is quite a bit of work for not all that much gain.
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.
@Trott tasked me with the digging... (since I was the nudnik who wanted this)
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.
LGTM if it works :-)
807205a
to
3dcff92
Compare
@refack @addaleax @cjihrig @mhdawson @bnoordhuis I dug into the Python enough to make it so that it only disables core files for the tests in the |
c654836
to
ac48ed5
Compare
Heh! Well, running the |
ea93f5d
to
b1fe802
Compare
Currently, tests in test/abort do not run in CI. This change configures the test runner to not write core files for abort tests and to run them. PR-URL: #14013 Fixes: #14012 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
So I think smartOS does not respect |
@refack If that's the case, I'd be OK with setting smartOS to skip all the |
cc/ @nodejs/platform-smartos , I thought we purposefully set the smartos boxes to dump cores at some point, so maybe that setting is conflicting? |
The reason why core files are created even when the
When global core dumps are enabled, they are created for all processes, even those whose I suggest we disable global core dumps, and enable only per-process core dumps with the following command:
|
Should this be backported to |
@misterdjules is that something that should be done in the test runner or in an ansible script? |
@misterdjules would you mind opening a PR in nodejs/build referencing this PR? I'm happy to review. |
@gibfahn Sounds good, will do that. |
This allows for controlling core files limits per process (e.g per tests). Ref: nodejs/node#14013
@gibfahn See nodejs/build#894. |
PR-URL: nodejs#15056 Fixes: nodejs#14012 Refs: nodejs#14013 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: #15056 Fixes: #14012 Refs: #14013 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
This allows for controlling core files limits per process (e.g per tests). PR-URL: #894 Refs: nodejs/node#14013
safe to assume there is nothing else actionable here? |
@MylesBorins First two commits should likely be cherry-picked over. They land cleanly right now. Third commit, I'd say no. It doesn't land cleanly and it's not clear to me that running the abort tests on v6.x-staging adds much value at this point. (We had not been running the abort tests regularly for years.) As long as they run on master and v8.x-staging, I think we're good. |
PR-URL: nodejs#15056 Fixes: nodejs#14012 Refs: nodejs#14013 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Backport-PR-URL: #16442 PR-URL: #15056 Fixes: #14012 Refs: #14013 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Backport-PR-URL: #16442 PR-URL: #15056 Fixes: #14012 Refs: #14013 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Backport-PR-URL: #16442 PR-URL: #15056 Fixes: #14012 Refs: #14013 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Currently, tests in test/abort do not run in CI.
This change configures the test runner to not write core files, and run
the abort tests.
Fixes: #14012
This should land only after #13985 because that fixes a problem that causes one of the tests to fail. (In other words, had we been running these tests, that bug would have been caught!)
@addaleax @refack @nodejs/build @nodejs/testing
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
build test tools