RFR: 8254309: appcds GCDuringDump.java failed - class must exist [v2]

Calvin Cheung ccheung at openjdk.java.net
Fri Oct 30 20:30:59 UTC 2020


On Fri, 30 Oct 2020 19:02:09 GMT, Yumin Qi <minqi at openjdk.org> wrote:

>> Hi,  Please review
>>   When CDS at dump time initializes archived heap, some classes are loaded. If at this time system runs out of memory the class will not be loaded. This is what we saw in this bug. The fix checks if OOM happened, if so we print out log and exit gracefully not causing a crash. Added a test case for testing purpose when exception/OOM happens during this stage. Also check during preload classes when OOM happens, exit vm with proper message.
>> 
>> Tests: tier1-4
>> 
>> Thanks
>> Yumin
>
> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Revise as review comment, add MaxHeapSize in exit message

Just one nit.

src/hotspot/share/memory/archiveUtils.cpp line 326:

> 324:   assert(exception != nullptr, "Sanity check");
> 325:   if (exception->is_a(SystemDictionary::OutOfMemoryError_klass())) {
> 326:     vm_exit_during_cds_dumping(err_msg("Out of memory. Please run with a larger Java heap, current MaxHeapSize = " SIZE_FORMAT "M", MaxHeapSize/M));

Line is too long. Consider break this into 2 to 3 lines.

-------------

Marked as reviewed by ccheung (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/948


More information about the hotspot-dev mailing list