RFR(s): 8169870: CDS: "assert(partition_size <= size()) failed: partition failed" on 32 bit JVM
Chris Plummer
chris.plummer at oracle.com
Sat Nov 19 19:24:35 UTC 2016
Hi Jiangli,
The changes look fine.
BTW, we also have LimitSharedSizes.java. Seems there is some overlap
with this test. I'm not sure how we ended up with both. Also not sure
how LargeSharedSpace.java caught this problem and LimitSharedSizes.java.
I guess it was just unlucky with the size it chose.
Chris
On 11/18/16 6:14 PM, Jiangli Zhou wrote:
> Please review following fix for JDK-8169870 <https://bugs.openjdk.java.net/browse/JDK-8169870>.
>
> http://cr.openjdk.java.net/~jiangli/8169870/webrev.00/ <http://cr.openjdk.java.net/~jiangli/8169870/webrev.00/>
>
> This is an old bug but only discovered recently. Thanks Dmitry for reporting the issue. During CDS dump time, the VM tries to allocate memory (by calling ReservedSpace()) for shared space at the top of the java heap. If ReservedSpace() fails, it tries to allocate the memory at a different location by calling ReservedSpace() again. After the second ReservedSpace() call, it initializes the shared space without checking if the second allocation attempt is successful or not.
>
> Added a new case in LargeSharedSpace.java and tested on both 32-bit and 64-bit platforms.
>
> Thanks,
> Jiangli
More information about the hotspot-runtime-dev
mailing list