RFR: JDK-8221278: Shenandoah should not enqueue string dedup candidates during root scan

Roman Kennke rkennke at redhat.com
Thu Mar 21 21:17:50 UTC 2019


 In Shenandoah, during the init-mark phase, we are scanning the
StringDedup roots (queues and tables) when string deduplication is
enabled. For this, we're using a closure that also enqueues dedup
canidates. Which means that we may end up concurrently reading AND
writing the queues, which leads to corruption. This seems to make the
TestStringDedupStress occasionally crash.

Bug:
https://bugs.openjdk.java.net/browse/JDK-8221278
Webrev:
http://cr.openjdk.java.net/~rkennke/JDK-8221278/webrev.00/

Proposed change is simple: Simply remove the ENQUEUE_DEDUP block and
related template fluff from init-mark. It means that strings that are
(only) reachable via local variables and such will not be
string-dedup-candidates. So what? ;-)

Testing: hotspot_gc_shenandoah fine. Failing test, amplified to fail
more reliably, run in loop 30x, all good.

Ok?

Roman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20190321/d2e04bd6/signature.asc>


More information about the hotspot-gc-dev mailing list