[jdk11u-dev] RFR: 8274338: com/sun/jdi/RedefineCrossEvent.java failed "assert(m != __null) failed: NULL mirror"
Zhengyu Gu
zgu at openjdk.java.net
Tue Nov 16 15:24:57 UTC 2021
This patch redoes JDK-8274338 backport to openjdk 11u.
Early backport failed and was backout. The failure was due to `CLD::loaded_classes_do()`, now requires to hold `MultiArray_lock`, therefore, the closure `LinkSharedClassesClosure` can not trigger `JavaCall` while holding a lock.
The solution is to borrow `CollectCLDClosure` from JDK-8251860 to collect loaded CLD, then walk then without `MultiArray_lock`.
The patch also pulled in some supporting methods/classes, such as `CLDG::loaded_cld_do()` from JDK-8213751 and `ClassLoaderDataGraphIterator` from JDK-8209645, etc.
Additional changes to get `CollectCLDClosure` to work in 11u:
- Changed `CLD::holder_phantom()` to `public` as JDK head
- Used `JNI local ref` to keep `CLD` alive
Test:
- [x] hotspot_appcds
- [x] tier1
-------------
Commit messages:
- Fix leading whitespace
- release local refs
- keep CLD alive
- Backport 172aed1a2d75756b140cb723133ac5fb67f7745e
Changes: https://git.openjdk.java.net/jdk11u-dev/pull/632/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk11u-dev&pr=632&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8274338
Stats: 101 lines in 4 files changed: 92 ins; 1 del; 8 mod
Patch: https://git.openjdk.java.net/jdk11u-dev/pull/632.diff
Fetch: git fetch https://git.openjdk.java.net/jdk11u-dev pull/632/head:pull/632
PR: https://git.openjdk.java.net/jdk11u-dev/pull/632
More information about the jdk-updates-dev
mailing list