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

David Holmes dholmes at openjdk.java.net
Thu Oct 14 22:40:45 UTC 2021


On Thu, 14 Oct 2021 16:03:22 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.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add assert that MultiArray_lock is held for loaded_classes_do.

We hit an assertion failure because execution of loaded_klasses_do by JVMTI encountered a shared array class that had a NULL mirror. So two things need to be known:
1. At what point does that shared array class become visible to loaded_klasses_do? and
2. At what point does the shared array class have its mirror set?

Either we must guarantee that the mirror is set before the array class is visible, or the two actions must be atomic with respect to the execution of loaded_klasses_do. The latter implies that any locking must cover both actions.

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

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


More information about the hotspot-dev mailing list