RFR 8027146: Class loading verification failure if GC occurs in Universe::flush_dependents_on

Daniel D. Daugherty daniel.daugherty at oracle.com
Fri Feb 14 07:15:18 PST 2014


On 2/13/14 12:00 PM, Coleen Phillimore wrote:
> Summary: Remove search in system dictionary and hacks, replace with 
> verifying in CLD::_klasses list.
>
> open webrev at http://cr.openjdk.java.net/~coleenp/8027146/

src/share/vm/classfile/classLoaderData.hpp
     Nocommentsother than why add a blank line on 273?

src/share/vm/classfile/classLoaderData.cpp
     No comments.

src/share/vm/classfile/dictionary.cpp
     No comments.

src/share/vm/classfile/systemDictionary.hpp
     No comments.

src/share/vm/classfile/systemDictionary.cpp
     So SystemDictionary::verify_obj_klass_present() isn't even
     useful or correct in sanity checking/debug code?

     Update: So InstanceKlass::verify_on() now does a much simpler
contains_klass() check. I understand now why the existing
         check needs to be replaced by the simpler and less strict
         check.

src/share/vm/oops/arrayKlass.hpp
     No comments.

src/share/vm/oops/arrayKlass.cpp
     No comments.

src/share/vm/oops/instanceKlass.hpp
     No comments.

src/share/vm/oops/instanceKlass.cpp
     The old code didn't call verify_obj_klass_present() unless
     is_loaded() is true. The new code presumes that is_loaded()
     is true since it expects the class to be present in the
     class_loader_data.

     Update: To put it another way: The old code assumed when
     is_loaded() is true that the class was in the system dictionary
     or in the placeholder table. That's not quite correct in all
     cases. When is_loaded() is true,all we know for sure is that
the class must be present inthe class_loader_data(); it might
still be "on its way" to either the system dictionary or the
placeholder table, but has not yet arrived there.

src/share/vm/oops/klass.hpp
     No comments.

src/share/vm/oops/klass.cpp
     No comments.

src/share/vm/oops/objArrayKlass.hpp
     No comments.

src/share/vm/oops/objArrayKlass.cpp
     No comments.

Thumbs up.

Dan



> bug link https://bugs.openjdk.java.net/browse/JDK-8027146
>
> Tested with AllocClasses.java with VM_Verify op suggested in the bug 
> report (can't add it's noreg-hard).   Also ran all jtreg and gc jtreg 
> tests with -XX:+VerifyBeforeGC.
>
> Thanks,
> Coleen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20140214/b8723e7f/attachment-0001.html 


More information about the hotspot-gc-dev mailing list