Withdrawn: 8264632: compiler/codecache/jmx/PoolsIndependenceTest.java fails to Notification not being received

Evgeny Nikitin enikitin at openjdk.java.net
Mon Apr 26 14:17:25 UTC 2021

On Tue, 20 Apr 2021 18:04:07 GMT, Evgeny Nikitin <enikitin at openjdk.org> wrote:

> Hi all,
> May I ask for reviews for this change? 
> **The case**
> https://bugs.openjdk.java.net/browse/JDK-8264632
> **The problem**
> The test calls for MemoryPoolMXBean.setUsageThreshold() and expects a Notification get fired when the threshold is breached. The Notification is never received.
> The failure most probably is caused by the combination of following events:
> 1. Some threshold has already breached (caused by some other tests); 
> 2. In this case MemoryPoolMXBean never fires subsequent Notifications until the usage is less than a set threshold;
> 3. The usage manages to grow up between these two lines[1]:
> final long usageThresholdLimit = bean.getUsage().getUsed() + 1;
> bean.setUsageThreshold(usageThresholdLimit);
> 4. The usage has never fallen below any set threshold and therefore Notification is never sent. Setting usageThresholdLimit to 0 doesn't clear up the situation "Notification has already been sent" either.
> [1] Very common, happens almost every time during my testing - the code cache usage grows up quickly at VM start.
> **Proposed solution:**
> 1. Before the actual test, I set the usageThresholdLimit to max. possible value;
> 2. This causes the current usage to appear below the threshold and therefore the "Notification has already been sent" state is cleared;
> 3. The monitoring is then switched off (by setting usageThresholdLimit to 0), as at the VM start.
> **Testing**
> 1. Preemptive breaching of some threshold causes the problem for non-modified test.
> 2. The modified test has been tested with debug versions of macosx, windows, linux x64 builds and a linux-aarch64-debug build.
> Thanks,
> Evgeny.

This pull request has been closed without being integrated.


PR: https://git.openjdk.java.net/jdk/pull/3592

More information about the hotspot-compiler-dev mailing list