RFR: 8211956: AppCDS crashes for some uses with JRuby (original) (raw)
Jiangli Zhou jiangli.zhou at oracle.com
Mon Oct 15 17:16:53 UTC 2018
- Previous message: RFR: 8211956: AppCDS crashes for some uses with JRuby
- Next message: RFR 8017061: os_bsd.cpp contains code for UseSHM and UseHugeTLBFS
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks for the review. In jdk 12, there is already an assert in space_at(), which is called by FileMapInfo::verify_region_checksum(). I'll add assert when back porting to jdk 11.
assert(i >= 0 && i < NUM_CDS_REGIONS, "invalid region");
With 12, the assert is hit when running into the bug:
after -XX: or in .hotspotrc: SuppressErrorAt=/filemap.hpp:166
A fatal error has been detected by the Java Runtime Environment:
Internal Error
(/export/users/jiangli/jdk12/open/src/hotspot/share/memory/filemap.hpp:166), pid=23161, tid=23162
assert(i >= 0 && i < 9) failed: invalid region
JRE version: (12.0) (slowdebug build )
Java VM: Java HotSpot(TM) 64-Bit Server VM (slowdebug
12-internal+0-2018-10-09-0504378.jianzhou.jdk12, mixed mode, aot, sharing, tiered, compressed oops, g1 gc, linux-amd64)
Core dump will be written. Default location: Core dumps may be
processed with "/usr/share/apport/apport %p %s %c" (or dumping to /export/users/jiangli/jruby/jruby-startup-master/core.23161) #
An error report file with more information is saved as:
/export/users/jiangli/jruby/jruby-startup-master/hs_err_pid23161.log
If you would like to submit a bug report, please visit:
http://bugreport.java.com/bugreport/crash.jsp
Thanks, Jiangli
On 10/14/18 8:47 PM, Ioi Lam wrote:
Hi Jiangli,
Looks good. Maybe also add an assert on the region index inside verifyregionchecksum()? No need to send new webrev. Thanks - Ioi
On 10/12/18 5:17 PM, Jiangli Zhou wrote: Please review the following trivial fix in FileMapInfo::verifymappedheapregions:
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::verifymappedheapregions accesses beyond the end of archived space array and reads in garbage, which causes the crash. The fix is to make sure FileMapInfo::verifymappedheapregions 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
- Previous message: RFR: 8211956: AppCDS crashes for some uses with JRuby
- Next message: RFR 8017061: os_bsd.cpp contains code for UseSHM and UseHugeTLBFS
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]