8212205 (XS) VM asserts after CDS archive has been unmapped

Ioi Lam ioi.lam at oracle.com
Thu Oct 25 18:22:50 UTC 2018


This is a silly bug but it happens only rarely, when address space 
causes insufficient memory to be reservable at addresses required by 
CDS. In this
case, the CDS archive is unmapped, but we forget to clean up
_shared_metaspace_{base,top}. As a result, the JVM will misidentify 
objects allocated in certain address ranges to be "shared", in the 
following function:

class MetaspaceObj {
   bool is_shared() const {
     return (((void*)this) < _shared_metaspace_top && ((void*)this) >= 

The fix is to reset those pointers after CDS has been unmapped.

- Ioi

More information about the hotspot-runtime-dev mailing list