JDK-8079223 : unnecessary performance degradation caused by fix to JDK-8052111
  • Type: Bug
  • Component: deploy
  • Affected Version: 6u91,7u75,8u31,9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-05-01
  • Updated: 2016-03-03
  • Resolved: 2015-05-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 JDK 8 JDK 9
6u101Fixed 7u80Fixed 8u45Fixed 9Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
The problem is caused by the security fix for : https://bugs.openjdk.java.net/browse/JDK-8079072
In that fix we stopped reading in from the cached index file the following fields:
validationTimeStamp,
knownToBeSigned,
blacklistValidationTime,
certExpirationDate,
classVerificationStatus,
hasOnlySignedEntries,
hasSingleCodeSource,
hasMissingSignedEntries, and
trustedLibrariesValidationTime,

and these are re-computed on every run.  Now it was originally thought that this performance degradation was caused by the time needed to recompute these values, but that proved to be negligible.
The problem is that after they are re-computed, there are places which will re-write the index file with the changed values.
the one place in CacheEntry.readIndexFile():
>                 if (hasSigningInfo() &&
>                         ((section4Pre15Length == 0 && enhancedJarAccess) ||
> BlackList.getInstance().hasBeenModifiedSince(blacklistValidationTime) ||
> TrustedLibraries.hasBeenModifiedSince(trustedLibrariesValidationTime)) &&
>                         (!Cache.isSystemCacheEntry(this) || Environment.isSystemCacheMode())) {
>
>                     raf.close();
>                     raf = null;
>                     saveUpgrade();
was comparing against  blacklistValidationTime and trustedLibrariesValidationTime (which are no longer reasons to write the index, since these values in the cache are ignored).
just changing that to:
>                 if (hasSigningInfo() &&
>                         ((section4Pre15Length == 0 && enhancedJarAccess)  &&
>                         (!Cache.isSystemCacheEntry(this) || Environment.isSystemCacheMode())) {
>
>                     raf.close();
>                     raf = null;
>                     saveUpgrade(); 


Comments
No issues caused by the fix in the recent deployment nightly for 7u-cpu. SQE OK to take the regression bug fix to CPU15_03.
08-05-2015

Crucible review: https://java.se.oracle.com/code/cru/CR-JDK9CLIENT-996
01-05-2015

problem is related to code cleanup after JDK-8052111 - simple to fix this regression instance, but still need to remove all code made obsolete by that security fix.
01-05-2015