RFR: 8264632: compiler/codecache/jmx/PoolsIndependenceTest.java fails to Notification not being received
enikitin at openjdk.java.net
Tue Apr 20 18:11:35 UTC 2021
May I ask for reviews for this change?
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:
final long usageThresholdLimit = bean.getUsage().getUsed() + 1;
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.
 Very common, happens almost every time during my testing - the code cache usage grows up quickly at VM start.
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.
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.
- 8264632: compiler/codecache/jmx/PoolsIndependenceTest.java fails to Notification not being received
Stats: 13 lines in 2 files changed: 12 ins; 0 del; 1 mod
Fetch: git fetch https://git.openjdk.java.net/jdk pull/3592/head:pull/3592
More information about the hotspot-compiler-dev