RFR: 8211956: AppCDS crashes for some uses with JRuby

Jiangli Zhou jiangli.zhou at oracle.com
Sat Oct 13 00:17:42 UTC 2018


Please review the following trivial fix in 
FileMapInfo::verify_mapped_heap_regions:

webrev: http://cr.openjdk.java.net/~jiangli/8211956/webrev.00/
bug: https://bugs.openjdk.java.net/browse/JDK-8211956

This issue was reported by Charles Nutter when using AppCDS with Jruby. 
The failure happens when large number of classes (>7000) and java 
objects (mirror objects of archived classes) are archived. With 'oa1' 
(open archive heap space 1) also being used, the runtime crashes during 
mapping/validating the archive heap regions. 
FileMapInfo::verify_mapped_heap_regions accesses beyond the end of 
archived space array and reads in garbage, which causes the crash. The 
fix is to make sure FileMapInfo::verify_mapped_heap_regions only 
verifies 'num' of spaces. Thanks Charles for reporting the issue and 
Claes for forwarding. Also thanks Ioi for jumping in and helping 
investigation.

I've also created a follow up RFE, JDK-8212149 for creating a stress 
test for archive heap regions with large number of archived heap objects.

Verified the fix with jruby. Running tier1-tier5.

Thanks,

Jiangli


More information about the hotspot-runtime-dev mailing list