Bugfix on CMSClassUnloadingEnabled used with CMSClassUnloadingMaxInterval > 0

Jungwoo Ha jwha at google.com
Mon Sep 16 23:14:28 UTC 2013


Hi,

We found that hotspot crashes when CMSClassUnloadingEnabled is true, and
CMSClassUnloadingMaxInterval > 0.
This is on hotspot24 and u40.
This is easily reproducible with DaCapo tradesoap benchmark with heapsize
around 200MB.

The reason for the crash is that CMS sets the root set when
CMSClassUnloadingEnabled is on during the constructor phase assuming that
every CMS cycle will unload the class.
However, when CMSClassUnloadingMaxInterval > 0, CMS may not unload classes
ended up crashing.
I think this is apparently a bug, and I attach the fix.
Please take a look at the attached patch.
My changes are resetting the root scanning option on every CMS cycle in
setup_cms_unloading_and_verification_state() if CMSCLassUnloadingEnabled is
on.

Please take a look and let us know how to proceed.

Thanks,
Jungwoo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20130916/96601e5f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cms-classunloading-bugfix.patch
Type: application/octet-stream
Size: 2200 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20130916/96601e5f/cms-classunloading-bugfix.patch>


More information about the hotspot-gc-dev mailing list