RFR: 8256658: Shenandoah: Deadlock between nmethod_entry_barrier and concurrent code root evacuator

Zhengyu Gu zgu at openjdk.java.net
Fri Nov 20 14:42:11 UTC 2020


Nightly tests revealed a deadlock after JDK-8256415.

The new concurrent code root evacuating/updating task sets up EvacOOM scope on the top level. If OOM occurs and nmethod_entry_barrier holds per-nmethod lock, while concurrent code root evacuating/updating task tries to acquire the exact per-nmethod lock, we deadlock.

The solution is to move EvacOOM scope under per-nmethod lock.

Test:
- [x] hotspot_gc_shenandoah
- [x] nightly tests

-------------

Commit messages:
 - Merge branch 'master' into JDK-8256658-coderoot-deadlock
 - Fix deadlock after JDK-8256415

Changes: https://git.openjdk.java.net/jdk/pull/1352/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1352&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8256658
  Stats: 17 lines in 1 file changed: 7 ins; 1 del; 9 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1352.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1352/head:pull/1352

PR: https://git.openjdk.java.net/jdk/pull/1352



More information about the hotspot-gc-dev mailing list