We see this in 11u after JDK-8260349 had been downported:
At least on Windows, we see this error intermittently (? unclear):
```
"MetaspaceSize (12582912) must be less than or equal to MaxMetaspaceSize (9437184)
MaxMetaspaceSize (9437184) must be greater than or equal to MetaspaceSize (9437184)"
```
The reason for this seems obvious at first; MetaspaceSize is by default 12..16M (depends on platform) and the constraint complains.
But the constraint checker runs after the argument ergo phase, during which MetaspaceSize is adjusted to fit into MaxMetaspaceSize (see Metaspace::ergo_initialize). So, this should not happen at all.
Even more confusing is why this only happens in 11 (depite JEP387 MetaspaceSize has the same default size) and why only on one platform so far, and why intermittent. The intermittent part is unconfirmed though.
I tried to manually reproduce this on various platforms without luck.
At least on Windows, we see this error intermittently (? unclear):
```
"MetaspaceSize (12582912) must be less than or equal to MaxMetaspaceSize (9437184)
MaxMetaspaceSize (9437184) must be greater than or equal to MetaspaceSize (9437184)"
```
The reason for this seems obvious at first; MetaspaceSize is by default 12..16M (depends on platform) and the constraint complains.
But the constraint checker runs after the argument ergo phase, during which MetaspaceSize is adjusted to fit into MaxMetaspaceSize (see Metaspace::ergo_initialize). So, this should not happen at all.
Even more confusing is why this only happens in 11 (depite JEP387 MetaspaceSize has the same default size) and why only on one platform so far, and why intermittent. The intermittent part is unconfirmed though.
I tried to manually reproduce this on various platforms without luck.
- duplicates
-
JDK-8262113 [Graal] vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted003/TestDescription.java fails
- Resolved
- relates to
-
JDK-8260349 Cannot programmatically retrieve Metaspace max set via JAVA_TOOL_OPTIONS
- Resolved