RFR: 8267404: vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java failed with OutOfMemoryError [v3]
Igor Ignatyev
iignatyev at openjdk.java.net
Mon May 24 09:06:19 UTC 2021
On Fri, 21 May 2021 15:19:17 GMT, Jie Fu <jiefu at openjdk.org> wrote:
>> Hi all,
>>
>> vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java OOMEs on Oracle's aarch64 platforms.
>> The reason is that both -Xmx and -XX:MetaspaceSize are not enough.
>>
>> From the original JBS decription of JDK-8267404, the VM OOMEs before the expected OOME in metaspace happened showing that -Xmx256m is not enough.
>>
>> Then, @dcubed-ojdk helped me test with -Xmx512, which still OOMEs.
>> However, the expected OOME in metaspace was caught this time.
>> But a second uncaught OOME in metaspace happened soon, which means -XX:MetaspaceSize=8m is not enough.
>>
>> So both -Xmx and -XX:MetaspaceSize should be increased.
>> The fix just:
>> - Revert changes about mataspace size setting
>> - Increase -Xmx from 256m to 1g
>>
>> -Xmx512m may be OK on Oracle's aarch64 machines, but to make it safer, -Xmx1g is preferred.
>>
>> Thanks.
>> Best regards,
>> Jie
>
> Jie Fu has updated the pull request incrementally with one additional commit since the last revision:
>
> Increase MaxMetaspaceSize to 512k
this will, however, only solve the problem w/ the test; but I also share Thomas' [concern](https://github.com/openjdk/jdk/pull/4140#issuecomment-845836298)[*], we shouldn't need 1g (or even .5g) of heap space to eat up 20m of metaspace (even w/ small classes like `AnonkTestee01`), so there seems to be an underlying defect in `linux-aarch64` build, which will need to be investigated/addressed separately.
-- Igor
[*]
> What I am concerned about is that with there should not be that much variance in how much heap space we use. Sure you can set it to 1g or 2g, but something is clearly off. I get by on Linux x64 with 128m, on 32bit x86 with 256m (since we don't have CompressedClassPointers we need somewhat more heap). But needing 1g on aarch64 seems weird.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4140
More information about the hotspot-runtime-dev
mailing list