[13] RFR(S) 8223794: applications/kitchensink/Kitchensink.java crash bad oop with Graal
dean.long at oracle.com
dean.long at oracle.com
Wed Jun 19 23:16:53 UTC 2019
Looks good.
dl
On 6/19/19 2:53 PM, Vladimir Kozlov wrote:
> http://cr.openjdk.java.net/~kvn/8223794/webrev.03/
> https://bugs.openjdk.java.net/browse/JDK-8223794
>
> Big thanks to Erik O. for pointing the possible cause of this problem
> and fix suggestion:
>
> "The JVMCINMethodData::get_nmethod_mirror() function in JVMCI is used
> to read the nmethod mirror from the nmethod oop section. However, the
> nmethod oops are weak, and not kept alive by GC. Yet strong references
> are created to the returned oop in places, without going through a
> keep-alive barrier. This could result in creating edges to dead oops,
> resulting in a crash eventually."
>
> I added nmethod::oop_at_phantom() method to notify GC that oop should
> be kept alive. It is used in JVMCI where it needs strong reference. I
> originally named new method and argument 'strong' but Erik pointed that:
>
> "Maybe s/strong/phantom/g for the new method name and parameters.
> Otherwise it is the other way around, i.e. when strong is true in the
> current webrev01, we actually read it as a phantom oop ref, and
> conversely when strong is false, we do read it as a strong oop ref.
> That is a bit confusing."
>
> Running Kitchensink without fix triggers the failure intermittently.
> With the fix I did not see the failure.
>
> Thanks,
> Vladimir
More information about the hotspot-compiler-dev
mailing list