-
Bug
-
Resolution: Fixed
-
P4
-
8, 11, 17, 18, 19
-
b06
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8297399 | 17.0.6 | Aleksey Shipilev | P4 | Resolved | Fixed | b04 |
It is the bug in original implementation of JDK-8043766.
The test tries to run with -XX:G1ConcRSLogCacheSize=30, while the max acceptable value is 27:
product(size_t, G1ConcRSLogCacheSize, 10, \
"Log base 2 of the length of conc RS hot-card cache.") \
range(0, 27) \
It only happens on large machines, because smaller machines get the test skipped with:
int maxCacheSize = Math.max(0, Math.min(31, getMaxCacheSize()));
if (maxCacheSize < hotCardTableSize) {
throw new SkippedException(String.format(
"Skiping test for %d cache size due max cache size %d",
hotCardTableSize, maxCacheSize));
}
getMaxCacheSize() is derived from the Runtime.getRuntime().freeMemory():
private static int getMaxCacheSize() {
long availableMemory = Runtime.getRuntime().freeMemory()
- ShrinkAuxiliaryDataTest.getMemoryUsedByTest() - 1l;
if (availableMemory <= 0) {
return 0;
}
long availablePointersCount = availableMemory / Unsafe.ADDRESS_SIZE;
return (63 - (int) Long.numberOfLeadingZeros(availablePointersCount));
}
So, on smaller machines, for example, my 128G desktop:
jtreg.SkippedException: Skiping test for 30 cache size due max cache size 26
at gc.g1.TestShrinkAuxiliaryData.test(TestShrinkAuxiliaryData.java:77)
On my 1T server, this test is not skipped and reliably fails like:
stdout: [];
stderr: [size_t G1ConcRSLogCacheSize=30 is outside the allowed range [ 0 ... 27 ]
Improperly specified VM option 'G1ConcRSLogCacheSize=30'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
]
exitValue = 1
The test tries to run with -XX:G1ConcRSLogCacheSize=30, while the max acceptable value is 27:
product(size_t, G1ConcRSLogCacheSize, 10, \
"Log base 2 of the length of conc RS hot-card cache.") \
range(0, 27) \
It only happens on large machines, because smaller machines get the test skipped with:
int maxCacheSize = Math.max(0, Math.min(31, getMaxCacheSize()));
if (maxCacheSize < hotCardTableSize) {
throw new SkippedException(String.format(
"Skiping test for %d cache size due max cache size %d",
hotCardTableSize, maxCacheSize));
}
getMaxCacheSize() is derived from the Runtime.getRuntime().freeMemory():
private static int getMaxCacheSize() {
long availableMemory = Runtime.getRuntime().freeMemory()
- ShrinkAuxiliaryDataTest.getMemoryUsedByTest() - 1l;
if (availableMemory <= 0) {
return 0;
}
long availablePointersCount = availableMemory / Unsafe.ADDRESS_SIZE;
return (63 - (int) Long.numberOfLeadingZeros(availablePointersCount));
}
So, on smaller machines, for example, my 128G desktop:
jtreg.SkippedException: Skiping test for 30 cache size due max cache size 26
at gc.g1.TestShrinkAuxiliaryData.test(TestShrinkAuxiliaryData.java:77)
On my 1T server, this test is not skipped and reliably fails like:
stdout: [];
stderr: [size_t G1ConcRSLogCacheSize=30 is outside the allowed range [ 0 ... 27 ]
Improperly specified VM option 'G1ConcRSLogCacheSize=30'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
]
exitValue = 1
- backported by
-
JDK-8297399 gc/g1/TestShrinkAuxiliaryData30 test fails on large machines
-
- Resolved
-
- relates to
-
JDK-8043766 CMM Testing: 8u40 Decommit auxiliary data structures
-
- Resolved
-
- links to
-
Commit openjdk/jdk17u-dev/14eb228c
-
Commit openjdk/jdk/590eb860
-
Review openjdk/jdk17u-dev/908
-
Review openjdk/jdk/7082
(1 links to)