Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

lmesnik
Copy link
Member

@lmesnik lmesnik commented Sep 20, 2023

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

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8316562: serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java times out after JDK-8314829 (Bug - P2)

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

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 20, 2023

👋 Welcome back lmesnik! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 20, 2023
@openjdk
Copy link

openjdk bot commented Sep 20, 2023

@lmesnik The following label will be automatically applied to this pull request:

  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the serviceability serviceability-dev@openjdk.org label Sep 20, 2023
@mlbridge
Copy link

mlbridge bot commented Sep 20, 2023

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a 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?

Copy link
Member

@dholmes-ora dholmes-ora left a 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.

@lmesnik
Copy link
Member Author

lmesnik commented Sep 20, 2023

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.

@lmesnik
Copy link
Member Author

lmesnik commented Sep 20, 2023

OutputAnalyzer 'firstmatch' method analyze result. It analyze string from 'String OutputBuffer getStdout()' and can't be used to communicate with process.

@dholmes-ora
Copy link
Member

OutputAnalyzer 'firstmatch' method analyze result. It analyze string from 'String OutputBuffer getStdout()' and can't be used to communicate with process.

Ah I see.

@dholmes-ora
Copy link
Member

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.

I must admit I'm unclear on why scanner was used here, but it would have made the fix much smaller/simpler.

Copy link
Member

@dholmes-ora dholmes-ora left a 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

Comment on lines +93 to +95
} else {
System.out.println("Ignoring: " + pidstring);
}
Copy link
Member

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?

Copy link
Member Author

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.

@openjdk
Copy link

openjdk bot commented Sep 20, 2023

@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:

8316562: serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java times out after JDK-8314829

Reviewed-by: dholmes, kevinw, dcubed

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 master branch:

  • 455cfae: 8315880: change LockingMode default from LM_LEGACY to LM_LIGHTWEIGHT
  • 9e00949: 8316427: Duplicated code for {obj,type}ArrayKlass::array_klass
  • c43ebd3: 8315981: Opensource five more random Swing tests
  • e30e356: 8316461: Fix: make test outputs TEST SUCCESS after unsuccessful exit
  • 242eeae: 8286757: adlc tries to build with /pathmap but without /experimental:deterministic
  • b275bdd: 8308995: Update Network IO JFR events to be static mirror events
  • e1870d3: 8316411: compiler/compilercontrol/TestConflictInlineCommands.java fails intermittent with force inline by CompileCommand missing
  • ec74194: 8316546: Backout JDK-8315932: runtime/InvocationTests spend a lot of time on dependency verification

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 20, 2023
Copy link
Member

@dcubed-ojdk dcubed-ojdk left a 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.

@lmesnik
Copy link
Member Author

lmesnik commented Sep 20, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Sep 20, 2023

Going to push as commit 54028e7.
Since your change was applied there have been 10 commits pushed to the master branch:

  • 7c991cc: 8296246: Update Unicode Data Files to Version 15.1.0
  • a021dbc: 8316149: Open source several Swing JTree JViewport KeyboardManager tests
  • 455cfae: 8315880: change LockingMode default from LM_LEGACY to LM_LIGHTWEIGHT
  • 9e00949: 8316427: Duplicated code for {obj,type}ArrayKlass::array_klass
  • c43ebd3: 8315981: Opensource five more random Swing tests
  • e30e356: 8316461: Fix: make test outputs TEST SUCCESS after unsuccessful exit
  • 242eeae: 8286757: adlc tries to build with /pathmap but without /experimental:deterministic
  • b275bdd: 8308995: Update Network IO JFR events to be static mirror events
  • e1870d3: 8316411: compiler/compilercontrol/TestConflictInlineCommands.java fails intermittent with force inline by CompileCommand missing
  • ec74194: 8316546: Backout JDK-8315932: runtime/InvocationTests spend a lot of time on dependency verification

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 20, 2023
@openjdk openjdk bot closed this Sep 20, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 20, 2023
@openjdk
Copy link

openjdk bot commented Sep 20, 2023

@lmesnik Pushed as commit 54028e7.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

4 participants