Make CPU fuser tests less flaky (and report better errors)#11897
Closed
zou3519 wants to merge 4 commits intopytorch:masterfrom
Closed
Make CPU fuser tests less flaky (and report better errors)#11897zou3519 wants to merge 4 commits intopytorch:masterfrom
zou3519 wants to merge 4 commits intopytorch:masterfrom
Conversation
b8256fb to
8d755f3
Compare
Contributor
Author
|
Mac build is flaky; this should be ready for review |
apaszke
reviewed
Sep 25, 2018
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
zou3519 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
This pr wraps the flaky system() call in a new function that does the following:
- call malloc_trim() before each system() call used by the CPU fuser.
This is to get rid of excess memory that may prevent a fork()
I also improved the error message for when system() fails so one knows from
the logs what is wrong ("Could not allocate memory, etc")
Test Plan: code reading
Contributor
Author
|
Not needed anymore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pr wraps the flaky system() call in a new function that does the following:
This is to get rid of excess memory that may prevent a fork()
I also improved the error message for when system() fails so one knows from
the logs what is wrong ("Could not allocate memory, etc")
Test Plan: code reading (I don't really have better ideas). I've verified through a debugger that the posix_spawn + vfork path is taken on two of my machines.
cc @apaszke @ezyang