JDK-8151434 : Need to make improvement to access temporary dir
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.crypto
  • Affected Version: 8u66
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_7
  • CPU: x86_64
  • Submitted: 2016-03-07
  • Updated: 2016-03-08
  • Resolved: 2016-03-08
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) Client VM (build 25.66-b18, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]

A DESCRIPTION OF THE PROBLEM :
We need a backport of JDK-7176176 for Java 8.

The described issue leads to performance issues in our client application when there are lots of files in the temp folder.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
see JDK-7176176

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The calculation of entropy should not be dependent on the amount of files in the temp folder.
ACTUAL -
The calculation of entropy depends on the amount of files in the temp folder.
If lasts minutes for some users with temp folder that contain >5GB data in hundreds of files.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Thread 2: (state = IN_NATIVE)
 - java.io.WinNTFileSystem.list(java.io.File) @bci=0 (Interpreted frame)
 - java.io.File.list() @bci=29 (Interpreted frame)
 - javax.crypto.JarVerifier.getSystemEntropy() @bci=118, line=785 (Interpreted frame)
 - javax.crypto.JarVerifier.testSignatures(java.security.cert.X509Certificate, java.security.cert.CertificateFactory) @bci=3, line=706 (Interpreted frame)
 - javax.crypto.JarVerifier.access$400(java.security.cert.X509Certificate, java.security.cert.CertificateFactory) @bci=2, line=34 (Interpreted frame)
 - javax.crypto.JarVerifier$1.run() @bci=71, line=183 (Interpreted frame)
 - javax.crypto.JarVerifier$1.run() @bci=1, line=149 (Interpreted frame)
 - java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction) @bci=0 (Interpreted frame)
 - javax.crypto.JarVerifier.<clinit>() @bci=7, line=148 (Interpreted frame)
 - javax.crypto.JceSecurity.loadPolicies(java.io.File, javax.crypto.CryptoPermissions, javax.crypto.CryptoPermissions) @bci=146, line=318 (Interpreted frame)
 - javax.crypto.JceSecurity.setupJurisdictionPolicies() @bci=130, line=263 (Interpreted frame)
 - javax.crypto.JceSecurity.access$000() @bci=0, line=48 (Interpreted frame)
 - javax.crypto.JceSecurity$1.run() @bci=0, line=81 (Interpreted frame)
 - java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction) @bci=0 (Interpreted frame)
 - javax.crypto.JceSecurity.<clinit>() @bci=49, line=78 (Interpreted frame)
 - javax.crypto.JceSecurityManager.<clinit>() @bci=31, line=65 (Interpreted frame)
 - javax.crypto.Cipher.getConfiguredPermission(java.lang.String) @bci=17, line=2587 (Interpreted frame)
 - javax.crypto.Cipher.getMaxAllowedKeyLength(java.lang.String) @bci=1, line=2611 (Interpreted frame)
 - sun.security.ssl.CipherSuite$BulkCipher.isAvailable(sun.security.ssl.CipherSuite$BulkCipher) @bci=36 (Interpreted frame)
 - sun.security.ssl.CipherSuite$BulkCipher.isAvailable() @bci=27 (Interpreted frame)
 - sun.security.ssl.CipherSuite.isAvailable() @bci=21 (Interpreted frame)
 - sun.security.ssl.SSLContextImpl.getApplicableCipherSuiteList(sun.security.ssl.ProtocolList, boolean) @bci=105 (Interpreted frame)
 - sun.security.ssl.SSLContextImpl.getDefaultCipherSuiteList(boolean) @bci=55 (Interpreted frame)
 - sun.security.ssl.SSLSocketImpl.init(sun.security.ssl.SSLContextImpl, boolean) @bci=88 (Interpreted frame)
 - sun.security.ssl.SSLSocketImpl.<init>(sun.security.ssl.SSLContextImpl) @bci=96 (Interpreted frame)
 - sun.security.ssl.SSLSocketFactoryImpl.createSocket() @bci=8 (Interpreted frame)
 - weblogic.rjvm.t3.client.T3ClientWeblogicSocketFactory.createSocket(java.net.InetAddress, int, int) @bci=34, line=73 (Interpreted frame)
 - weblogic.socket.BaseAbstractMuxableSocket.createSocket(java.net.InetAddress, int, int) @bci=14, line=135 (Interpreted frame)
 - weblogic.rjvm.t3.client.MuxableSocketT3.newSocketWithRetry(java.net.InetAddress, int, int) @bci=7, line=189 (Interpreted frame)
 - weblogic.rjvm.t3.client.MuxableSocketT3.connect(java.net.InetAddress, int, int) @bci=5, line=359 (Interpreted frame)
 - weblogic.rjvm.t3.client.ConnectionFactoryT3S.createConnection(java.net.InetAddress, int, weblogic.protocol.ServerChannel, weblogic.rjvm.JVMID, int) @bci=42, line=40 (Interpreted frame)
 - weblogic.rjvm.ConnectionManager.createConnection(weblogic.protocol.Protocol, java.net.InetAddress, int, weblogic.protocol.ServerChannel, weblogic.rjvm.JVMID, int) @bci=95, line=1855 (Interpreted frame)
 - weblogic.rjvm.ConnectionManager.findOrCreateConnection(weblogic.protocol.ServerChannel, weblogic.rjvm.JVMID, int) @bci=342, line=1489 (Interpreted frame)
 - weblogic.rjvm.ConnectionManager.bootstrap(weblogic.rjvm.JVMID, weblogic.protocol.ServerChannel, int) @bci=17, line=460 (Interpreted frame)
 - weblogic.rjvm.ConnectionManager.bootstrap(java.net.InetAddress, int, weblogic.protocol.ServerChannel, int) @bci=73, line=328 (Interpreted frame)
 - weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(java.net.InetAddress, int, java.lang.String, java.lang.String, int) @bci=351, line=267 (Interpreted frame)
 - weblogic.rjvm.RJVMManager.findOrCreate(java.net.InetAddress, int, java.lang.String, java.lang.String, int) @bci=8, line=204 (Interpreted frame)
 - weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(java.net.InetAddress, int, java.lang.String, int) @bci=15, line=238 (Interpreted frame)
 - weblogic.rjvm.RJVMFinder.findOrCreateInternal(boolean, java.lang.String, weblogic.rmi.spi.HostID, int) @bci=147, line=200 (Interpreted frame)
 - weblogic.rjvm.RJVMFinder.findOrCreate(boolean, java.lang.String, weblogic.rmi.spi.HostID, int) @bci=18, line=169 (Interpreted frame)
 - weblogic.rjvm.ServerURL.findOrCreateRJVM(boolean, java.lang.String, weblogic.rmi.spi.HostID, int, boolean) @bci=31, line=165 (Interpreted frame)
 - weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(weblogic.jndi.Environment, java.lang.String, weblogic.rmi.spi.HostID) @bci=155, line=350 (Interpreted frame)
 - weblogic.jndi.Environment.getContext(java.lang.String, weblogic.rmi.spi.HostID) @bci=71, line=319 (Interpreted frame)
 - weblogic.jndi.Environment.getContext(java.lang.String) @bci=3, line=288 (Interpreted frame)
 - weblogic.jndi.WLInitialContextFactory.getInitialContext(java.util.Hashtable) @bci=9, line=117 (Interpreted frame)
 - javax.naming.spi.NamingManager.getInitialContext(java.util.Hashtable) @bci=114 (Interpreted frame)
 - javax.naming.InitialContext.getDefaultInitCtx() @bci=12 (Interpreted frame)
 - javax.naming.InitialContext.init(java.util.Hashtable) @bci=21 (Interpreted frame)
 - javax.naming.InitialContext.<init>(java.util.Hashtable) @bci=33 (Interpreted frame)

REPRODUCIBILITY :
This bug can be reproduced often.

CUSTOMER SUBMITTED WORKAROUND :
empty temp folder on a regular base


Comments
Seems like a reasonable candidate for JDK 8u. I'm closing as a duplciate of JDK-7176176 and will open backport records there.
08-03-2016