[jdk17u] RFR: 8276205: Shenandoah: CodeCache_lock should always be held for initializing code cache iteration
Zhengyu Gu
zgu at openjdk.java.net
Mon Nov 15 16:05:57 UTC 2021
I would like to backport this Shenandoah specific fix to jdk17u.
This patch fixed the bug that not holding CodeCache_lock while initializing concurrent nmethod iterations, that can lead to miscount number of concurrent walker and result assertion failure.
The patch fixed a bug that prevents iterators from walking nmethod concurrently due to holding CodeCache_lock during the walk.
The original patch does not apply cleanly, due to context changes. But the patch is small and simple, conflicts can be easily resolved manually.
Test:
- [x] hotspot_gc_shenandoah
-------------
Commit messages:
- Backport 99b7b95e014da6e491ba7adfd21de53d6ae166fe
Changes: https://git.openjdk.java.net/jdk17u/pull/262/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk17u&pr=262&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8276205
Stats: 7 lines in 2 files changed: 2 ins; 1 del; 4 mod
Patch: https://git.openjdk.java.net/jdk17u/pull/262.diff
Fetch: git fetch https://git.openjdk.java.net/jdk17u pull/262/head:pull/262
PR: https://git.openjdk.java.net/jdk17u/pull/262
More information about the jdk-updates-dev
mailing list