jdk icon indicating copy to clipboard operation
jdk copied to clipboard

8290909: MemoryPoolMBean/isUsageThresholdExceeded tests failed with "isUsageThresholdExceeded() returned false, and is still false, while threshold = MMMMMMM and used peak = NNNNNNN"

Open kevinjwalls opened this issue 3 years ago • 4 comments

This is test unstable when monitoring CodeHeap pools as they can change outside the test's control. Attempting more heuristics to sense these unrelated changes just means we skip more pools.

The test design, making a Java allocation to affect a memory pool, shows it was intended for Java heap pools, so the test should focus on them. If we make a larger allocation during the test we actually can observe a change in size in the old gen pools it monitors (new gen pools are not expected to have thresholds, so they are skipped).

There exist specific tests in test/hotspot/jtreg/compiler/codecache/jmx which are intended for non-heap pools, so we should skip them intentionally here in isUsageThresholdExceeded.

Other edits in the test to fix that the peak usage reported by the test was simply usage, not peak. Fetch the usage and peak usage as near together as possible in the test. At line 110 in the test, remove an attempt to skip pools we can't monitor (which was working, but does not cover all cases).

Example test log, showing allocation that hits the old gen and triggers the threshold set by the test:

----------System.out:(15/796)---------- ... 5 pool G1 Old Gen of type: Heap memory used value is 1024000 max is 1038090240 isExceeded = false peak used value is 1024000 threshold set to 1024001 threshold count 0 reset peak usage. peak usage = 1024000 isExceeded = false Allocated heap. isExceeded = true used value is 106930176 max is 1038090240 isExceeded = true peak used value is 106930176 peak max is 1038090240 threshold count 1


Progress

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

Issue

  • JDK-8290909: MemoryPoolMBean/isUsageThresholdExceeded tests failed with "isUsageThresholdExceeded() returned false, and is still false, while threshold = MMMMMMM and used peak = NNNNNNN"

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9842/head:pull/9842
$ git checkout pull/9842

Update a local copy of the PR:
$ git checkout pull/9842
$ git pull https://git.openjdk.org/jdk pull/9842/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9842

View PR using the GUI difftool:
$ git pr show -t 9842

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9842.diff

kevinjwalls avatar Aug 11 '22 18:08 kevinjwalls

:wave: Welcome back kevinw! 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.

bridgekeeper[bot] avatar Aug 11 '22 18:08 bridgekeeper[bot]

@kevinjwalls 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[bot] avatar Aug 11 '22 19:08 openjdk[bot]

Webrevs

mlbridge[bot] avatar Aug 11 '22 20:08 mlbridge[bot]

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

8290909: MemoryPoolMBean/isUsageThresholdExceeded tests failed with "isUsageThresholdExceeded() returned false, and is still false, while threshold = MMMMMMM and used peak = NNNNNNN"

Reviewed-by: cjplummer, amenkov

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 212 new commits pushed to the master branch:

  • 07c9ba74fa3baebffcc15d3ee6ef941edf6be1a3: 8292686: runtime/cds/appcds/TestWithProfiler.java SIGSEGV in TableStatistics ctr
  • 235151ead89f9102e3a57ba8f88807f180887866: 8292676: Remove two kerberos tests from problem list
  • df5209e70fd92ec6bda4e7356a3ad121732f6c66: 8292683: Remove BadKeyUsageTest.java from Problem List
  • 74d3330e106f2f920bf264356e4f25f8f6c11580: 8292682: Code change of JDK-8282730 not updated to reflect CSR update
  • 57aac2ab6569c18a56e9a36f174bb0bf09955f83: 8290981: Enable CDS for zero builds
  • 6a8a531359295849113aa14fd6cba21c886decf3: 8292564: x86: Remove redundant casts in Assembler usages
  • 7244dd6fab0c516ed76af594593b8378512620c8: 8292267: Clean up synchronizer.hpp
  • 1f3578b79c6355b976d64756da7e4a8af32c2987: 8292446: Make TableRateStatistics optional in CHT
  • 45dec480ef6f1d5509f4afbbf414c69584ac252e: 8292592: JFR test TestNative is not reliable due to low rate of sampling.
  • 58aae340a9892889ef8784ef9360bb7e0af85ddd: 8292576: Improve wording of AccessFlag-related specs
  • ... and 202 more: https://git.openjdk.org/jdk/compare/57bf603b7332db86c39680d16b78f94a904daf46...master

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[bot] avatar Aug 12 '22 22:08 openjdk[bot]

thanks Chris!

kevinjwalls avatar Aug 16 '22 14:08 kevinjwalls

thanks Alex!

kevinjwalls avatar Aug 20 '22 14:08 kevinjwalls

/integrate

kevinjwalls avatar Aug 20 '22 14:08 kevinjwalls

Going to push as commit 3601e30df794db122d8d04fb3c04868ccbaa0baf. Since your change was applied there have been 214 commits pushed to the master branch:

  • 37c0a13647e74fd02823a3f621e986f96904b933: 8292350: Use static methods for hashCode/toString primitives
  • 44532009fff11884aa6f16a997b771c41cb01d2f: 8292628: x86: Improve handling of constants in trigonometric stubs
  • 07c9ba74fa3baebffcc15d3ee6ef941edf6be1a3: 8292686: runtime/cds/appcds/TestWithProfiler.java SIGSEGV in TableStatistics ctr
  • 235151ead89f9102e3a57ba8f88807f180887866: 8292676: Remove two kerberos tests from problem list
  • df5209e70fd92ec6bda4e7356a3ad121732f6c66: 8292683: Remove BadKeyUsageTest.java from Problem List
  • 74d3330e106f2f920bf264356e4f25f8f6c11580: 8292682: Code change of JDK-8282730 not updated to reflect CSR update
  • 57aac2ab6569c18a56e9a36f174bb0bf09955f83: 8290981: Enable CDS for zero builds
  • 6a8a531359295849113aa14fd6cba21c886decf3: 8292564: x86: Remove redundant casts in Assembler usages
  • 7244dd6fab0c516ed76af594593b8378512620c8: 8292267: Clean up synchronizer.hpp
  • 1f3578b79c6355b976d64756da7e4a8af32c2987: 8292446: Make TableRateStatistics optional in CHT
  • ... and 204 more: https://git.openjdk.org/jdk/compare/57bf603b7332db86c39680d16b78f94a904daf46...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar Aug 20 '22 14:08 openjdk[bot]

@kevinjwalls Pushed as commit 3601e30df794db122d8d04fb3c04868ccbaa0baf.

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

openjdk[bot] avatar Aug 20 '22 14:08 openjdk[bot]