JVM fails guarantee with a G1 collector after going through a JVMTI heap iteration with a subsequent full GC:
# Internal Error (/tmp/jprt/P1/B/025853.ap31282/source/src/share/vm/classfile/dictionary.cpp:262), pid=3474, tid=9
# Error: guarantee(!is_alive->do_object_b(k_def_class_loader),"defining loader should not be live if klass is not")
JVMTI reachable objects iteration functions use a call to object_iterate() to clean the marking bits of the objects (it uses marking bits to track the vertices of the object graph that it visits). The semantics of the object_iterate() include iteration over the perm gen. However G1 doesn't do that. The fix is to include the perm gen objects in the iterable set.