RFR: 8274338: com/sun/jdi/RedefineCrossEvent.java failed "assert(m != __null) failed: NULL mirror"
David Holmes
dholmes at openjdk.java.net
Wed Oct 13 21:36:49 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.
Hi Coleen,
Given the array_klasses() is accessed lock-free (using acquire/release semantics) I don't see how adding this lock prevents a partially restored array from being observed? The lock prevents concurrent restoration operations, and prevents restoration concurrently with creation (if that is even possible), but readers are still lock-free AFAICS.
Thanks,
David
src/hotspot/share/oops/instanceKlass.cpp line 2588:
> 2586: if (array_klasses() != NULL) {
> 2587: // To get a consistent list of classes we need MultiArray_lock to ensure
> 2588: // array classes aren't observed while they are being created.
s/created/restored
-------------
PR: https://git.openjdk.java.net/jdk/pull/5935
More information about the hotspot-dev
mailing list