RFR(s): 8169870: CDS: "assert(partition_size <= size()) failed: partition failed" on 32 bit JVM
jiangli.zhou at oracle.com
Mon Nov 21 18:05:22 UTC 2016
> On Nov 20, 2016, at 10:17 PM, Ioi Lam <ioi.lam at oracle.com> wrote:
> Hi Jiangli,
> The VM changes look OK to me.
Thanks for the review.
> For the test case, could you add a comment for these two output strings?
> "larger than compressed klass limit"
> "Unable to allocate memory for shared space"
> under what condition will they happen?
Will do. Thanks for the suggestion.
> - Ioi
> On 11/20/16 8:30 PM, serguei.spitsyn at oracle.com wrote:
>> Hi Jiangli,
>> This looks good.
>> On 11/18/16 18:14, 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.
More information about the hotspot-runtime-dev