RFR: 8266963: Reentrance condition for safepoint/handshake [v2]

Yude Lin github.com+16811675+linade at openjdk.java.net
Mon May 24 06:18:56 UTC 2021


> Shenandoah hangs when running specjvm2008 derby. The reason is a Java Thread reenters safepoint/handshake and blocks on itself. Please checkout the bugid for more details. After discussion with @zhengyu123, we think this might not be Shenandoah-specific. I propose to add a check before processing the safepoint/handshake.
> 
> An alternative approach (also insight from @zhengyu123) is to move the check a little earlier to the specific place where the Java Thread do ThreadBlockInVM. To feel reassured that no more reentrance exists in other places, I still leave the check in safepoint/handshake as debug code. See https://github.com/openjdk/jdk/compare/master...linade:reentrancecond
> 
> I'd appreciate more of your thoughts on these as I understand it could be a rather critical part of the code.

Yude Lin has updated the pull request incrementally with two additional commits since the last revision:

 - Revert "8262443: GenerateOopMap::do_interpretation can spin for a long time."
   
   This reverts commit 7988c1d9aa7e3b990c17fdf5e31195e66e7fc5f2.
 - Revert "8266963: Reentrance condition for safepoint/handshake"
   
   This reverts commit aa1ba2353e28877217e23c00577427f4f2c001ca.

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/4028/files
  - new: https://git.openjdk.java.net/jdk/pull/4028/files/aa1ba235..9677d416

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4028&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4028&range=00-01

  Stats: 43 lines in 4 files changed: 2 ins; 38 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4028.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4028/head:pull/4028

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


More information about the hotspot-runtime-dev mailing list