[aarch64-port-dev ] [8u] 8231366: Shenandoah: Shenandoah String Dedup thread is not properly initialized

Andrew John Hughes gnu.andrew at redhat.com
Mon Sep 23 16:43:35 UTC 2019



On 23/09/2019 17:24, Zhengyu Gu wrote:
> This bug seems to exist since day one of 8u backport. The
> ConcurrentGCThread API is different in 8u and we leave
> ShenandoahDedupThread not properly initialized before it enters work loop.
> 
> In Shenandoah String Deduplication tests, the bug results assertion
> failure that shows Thread::current() == NULL.
> 
> The bug only manifests on Windows, is due to discrepancy of java_start()
> implementation on different OSs. e.g. it sets *thread* on Linux.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8231366
> Webrev: http://cr.openjdk.java.net/~zgu/JDK-8231366/webrev.00/
> 
> Test:
>   hotspot_gc_shenandoah on Windows and Linux.
> 
> Thanks,
> 
> -Zhengyu
> 

Looks fine to me and matches what is done in other subclasses of
ConcurrentGCThread like shenandoah/shenandoahControlThread.cpp and
g1/g1StringDedupThread.cpp.

It does make me wonder if there isn't some way that ConcurrentGCThread
could catch this lack of initialisation, or do the initialisation
itself, then defer to the run() implementation of a subclass.

Thanks,
-- 
Andrew :)

Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew



More information about the aarch64-port-dev mailing list