RFR(XS) 8213250 CDS archive creation aborts due to metaspace object allocation failure
ioi.lam at oracle.com
Thu Nov 1 18:07:13 UTC 2018
When Metaspace::allocate() fails, usually we first try to GC to see if
some MetaspaceObjs can be freed. This is an optimization to avoid
expanding the metaspace.
However, GC cannot run in the last phase of CDS which runs inside the VM
The old code just aborts the CDS dump. The fix is to unconditionally
metaspace without doing a GC.
(During GC dump time, no classes are unloaded, so even if we force a GC,
not free up any metaspace anyway).
Before the fix, the test case (jruby) would fail to dump once a couple
of times. Now
it has dumped hundreds of times without failure.
I am also running hs-tier 1/2
More information about the hotspot-dev