RFR: 8198668: MemoryPoolMBean/isUsageThresholdExceeded/isexceeded001/TestDescription.java still failing [v3]
Serguei Spitsyn
sspitsyn at openjdk.org
Wed Jul 6 22:40:52 UTC 2022
On Thu, 30 Jun 2022 20:54:15 GMT, Kevin Walls <kevinw at openjdk.org> wrote:
>> Test has been problemlisted for a long time due to intermittent failures.
>>
>> This is a difficult test as it tries to monitor usage thresholds on Memory Pools which are outside its control.
>> Not just Java heap pools, where the allocation it makes may or may not affect a particuclar pool, but non-heap pools such as CodeHeap and Metadata, where other activity in the VM can affect their usage and surprise the test.
>>
>> The test iterates JMX memory pools where thresholds are supported, sets a threshold one byte higher than current usage, and makes an allocation. This only makes sense on Java heap pools. It is tempting to skip non-heap pools, but this test can still give a sanity test about threshold behaviour. That is actually its main purpose, as the allocation is unlikely to affect the pool being tested.
>>
>> With the changes here, I'm seeing the test and all its variations pass reliably, i.e. 50 iterations in each tested platform.
>>
>> Skip testing a non-heap memory pool, e.g. CodeHeap, if it is hitting the threshold while we test, because that means it is changing outside our control. Also re-test isExceeded on failure, as fetching the usage and isExceeded is a race.
>>
>> Logging of more pool stats to better understand failures.
>
> Kevin Walls has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
>
> - Merge remote-tracking branch 'upstream/master' into 8198668_MBean_threshold_test
> - Show log output
> - 8198668: MemoryPoolMBean/isUsageThresholdExceeded/isexceeded001/TestDescription.java still failing
Looks good to me.
I've posted a couple of minor questions/comments.
Thanks,
Serguei
test/hotspot/jtreg/vmTestbase/nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded001.java line 116:
> 114: }
> 115:
> 116: // If used value is less than threshold, then isUsageThresholdExceeded()
Nit: Replace(?): "If used value" => "If peak used value"
test/hotspot/jtreg/vmTestbase/nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded001.java line 130:
> 128: }
> 129: } else
> 130: // If used value is greater or equal than threshold, then
Nit: Replace(?): "If used value" => "If peak used value"
-------------
Marked as reviewed by sspitsyn (Reviewer).
PR: https://git.openjdk.org/jdk/pull/9309
More information about the serviceability-dev
mailing list