[11u]: RFR: 8222914: Partial backport of JDK-8218266
christoph.langer at sap.com
Mon Aug 5 09:39:06 UTC 2019
Thank you for the review, Coleen.
From: coleen.phillimore at oracle.com <coleen.phillimore at oracle.com>
Sent: Donnerstag, 1. August 2019 21:58
To: Langer, Christoph <christoph.langer at sap.com>; jdk-updates-dev at openjdk.java.net
Cc: Hotspot dev runtime <hotspot-runtime-dev at openjdk.java.net>
Subject: Re: [11u]: RFR: 8222914: Partial backport of JDK-8218266
This looks good. Well done putting all the pieces together.
On 7/31/19 11:11 PM, Langer, Christoph wrote:
please help to review the backport for JDK-8222914: Partial backport of JDK-8218266.
As the description in JDK-8222914 is very sparse, I had to do some guesswork. Here's what I've done:
First of all, it mentions JDK-8215505 being in 11u. I checked this and found the patch was not in OpenJDK 11u. The bug itself seems to be a secret Oracle bug. So I applied the patch for JDK-8215505 from jdk/jdk and resolved it. It basically removed void Dictionary::clean_cached_protection_domains(DictionaryEntry* probe). I had to help mercurial a little bit because it didn't apply cleanly since there was probably some mismatch around the removed code compared to the original version.
Then I looked at the upstream patch for JDK-8218266. I first of all applied the changes to test/hotspot/jtreg/runtime/Dictionary/ProtectionDomainCacheTest.java and added some handwork to make it run (e.g. updates to JarUtils). Then I could then see that the test fails in 11u-dev which ought to be fixed by the changes in the hotspot/share/classfile area. The essence of the fix seems to be merely to resurrect Dictionary::clean_cached_protection_domains and call it at the right spot. The first thing was not too complicated by taking the current "Dictionary::clean_cached_protection_domains" from jdk/jdk and make it fit to jdk11u-dev. But the place where it is invoked in jdk/jdk does not really exist in jdk11u code level. I looked around and then thought the best place would be to call it in ClassLoaderDataGraph::do_unloading when a dead loader was seen. The closure for the loaded CLDs does not yet exist in jdk11u and lots of other things seem to have changed in that area from 11 until now which is too much for backporting.
TL;DR: The test fails in 11u-dev without the patch and passes afterwards.
More information about the hotspot-runtime-dev