[16] 8247736: Shenandoah: assert(_nm->is_alive()) failed: only alive nmethods here
Roman Kennke
rkennke at redhat.com
Mon Jun 22 15:00:34 UTC 2020
The patch looks ok to me.
Thank you,
Roman
On Mon, 2020-06-22 at 10:12 -0400, Zhengyu Gu wrote:
> The assertion is unreliable, as a nmethod can become a zombie before
> it
> is unregistered, and nmethod's state change can race against
> concurrent
> nmethod iteration, since they are under two different locks.
>
> We did not see this assertion before JDK-8245961, because we used
> CodeCache::blobs_do() to scan code cache and did not have the
> assertion
> on its code path.
>
> Ideally, I would prefer to keep nmethod list hygienic: unregister
> the
> nmethod before making state transition. However, offline discussion
> with
> Erik, he convinced me that could have unexpected consequences and
> risky.
> Mark through and evacuate/disarm zombie nmethods, while undesirable,
> but
> harmless.
>
> So, let's just filter out dead nmethod (still racy) and remove the
> assertion.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8247736
> Webrev:
> http://cr.openjdk.java.net/~zgu/JDK-8247736/webrev.00/index.html
>
> Test:
> hotspot_gc_shenandoah
>
> Thanks,
>
> -Zhengyu
>
More information about the hotspot-gc-dev
mailing list