-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8316562: serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java times out after JDK-8314829 #15833
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
Conversation
…es out after JDK-8314829
👋 Welcome back lmesnik! A progress list of the required criteria for merging this PR into |
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.
Can't you just change the loop:
while ((pidstring = largeHeapScanner.findInLine("PID\\[[0-9].*\\]")) == null) {
Thread.sleep(500);
}
to something like:
while ((pidstring = largeHeapScanner.findInLine("PID\\[[0-9].*\\]")) == null) {
largeHeapScanner.nextLine();
}
to check each line of output until there is a match?
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.
Or even use the regular OutputAnalyzer
and its firstmatch
method.
Something like this was my first fix. Use largeHeapScanner.nextLine() to read String and check it. However, it makes unclear why a scanner is needed for line-by-line parsing. So I decided to change it to make a more known pattern for parsing input by line. |
OutputAnalyzer 'firstmatch' method analyze result. It analyze string from 'String OutputBuffer getStdout()' and can't be used to communicate with process. |
Ah I see. |
I must admit I'm unclear on why scanner was used here, but it would have made the fix much smaller/simpler. |
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.
Okay - seems reasonable. One query.
Thanks
} else { | ||
System.out.println("Ignoring: " + pidstring); | ||
} |
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.
Do we really want this in the test output?
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.
It might be helpful to ensure that we don't mess with matching PID line if test fails.
@lmesnik This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 8 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
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.
Thumbs up. Please integrate this fix soon to reduce the noise in Tier4.
/integrate |
Going to push as commit 54028e7.
Your commit was automatically rebased without conflicts. |
Test start failing because of unexpected VM logging.
The fix is to search expected string ignoring any unknown output from forked process.
Tested with tier1 and by running test with various options used in CI.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15833/head:pull/15833
$ git checkout pull/15833
Update a local copy of the PR:
$ git checkout pull/15833
$ git pull https://git.openjdk.org/jdk.git pull/15833/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 15833
View PR using the GUI difftool:
$ git pr show -t 15833
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15833.diff
Webrev
Link to Webrev Comment