RFR: 8274338: com/sun/jdi/RedefineCrossEvent.java failed "assert(m != __null) failed: NULL mirror"

David Holmes dholmes at openjdk.java.net
Thu Oct 14 06:02:53 UTC 2021


On Wed, 13 Oct 2021 20:29:46 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> The MultiArray_lock isn't held when restoring shared arrays, so an observer can find one that isn't completely restored.
> Tested with tier1-3 in progress, and CDS tests locally.  Not really reproduceable otherwise even with sleeps.

> This is the assert it gets in ClassLoaderData::loaded_classes_do, where this is the NULL CLD.
> 359 if (k->is_array_klass() || (k->is_instance_klass() && InstanceKlass::cast(k)->is_loaded())) {
> 360 #ifdef ASSERT
> 361 oop m = k->java_mirror();
> 362 assert(m != NULL, "NULL mirror"); 

Maybe it is the assertion that is wrong? If we are actually adding incomplete classes to the CLD such that they are visible to traversal, then the code should not be assuming they are complete and a NULL mirror may be perfectly acceptable?

-------------

PR: https://git.openjdk.java.net/jdk/pull/5935


More information about the hotspot-dev mailing list