RFR: 8274338: com/sun/jdi/RedefineCrossEvent.java failed "assert(m != __null) failed: NULL mirror"
David Holmes
dholmes at openjdk.java.net
Thu Oct 14 05:48:49 UTC 2021
On Thu, 14 Oct 2021 05:06:00 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> whereas Klass::restore_unshareable_info always uses publicize==true. Could that be an issue?
The definition of publicize is just:
`publicize = !is_internal();`
and I can't see how that would change the visibility in terms of the JVMTI code.
> Maybe we should delay the mirror creation to a later time?
I think there should be a lot of similarity between the process for regular loading and the loading from the archive. But ultimately both should have the same property: no publishing of the klass until after it is fully "initialized". But neither process seems to ensure that, which is puzzling ... unless I'm not looking high enough up for some locking in the process in both cases.
Thinking further on the fix ... without knowing exactly how the assertion failure arises, it seems to me that the fix cannot be complete. If the JVMTI code is racing with the execution of restore_unshareable_info and the setting of the mirror, then even with the lock added the JVMTI code could still get there first and find the mirror not set.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5935
More information about the hotspot-dev
mailing list