Java 8u 45上的Applet加载非常慢,堆栈溢出错误,而它与Java 7一起工作正常 [英] Applets loading very slow on Java 8u 45 with stack overflow error while it works fine with Java 7
问题描述
在Java版本8 1.8.0_45-b15上通过网络打开Applet时,我在Java控制台上收到Stackoverflow错误。 applet被加载但需要大约8分钟,并且在网络上的任何Java 7版本中都可以正常工作。
I am getting a Stackoverflow error on Java Console while opening the Applets over network on Java Version 8 build 1.8.0_45-b15 . The applet gets loaded but takes around 8 minutes and the same works fine in any of the Java 7 versions over the network .
任何人都可以帮忙..堆栈跟踪如下。
Can anyone please help .. The stacktrace is as follows .
java.lang.StackOverflowError
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.provider.PolicyFile.getPermissions(Unknown Source)
at sun.security.provider.PolicyFile.getPermissions(Unknown Source)
at sun.security.provider.PolicyFile.implies(Unknown Source)
at java.security.ProtectionDomain.implies(Unknown Source)
at java.security.AccessControlContext.checkPermission(U
推荐答案
我有类似的问题和发现。
I have a similar problem and finding.
我们在Firefox中使用applet。
当前测试版本:
We are using an applet in Firefox. Current Testing versions:
- Firefox:46.0.1
- Java:jre1.8.0 _51(32位)
我使用JFR(Java Flight Recorder)和Oracle Mission Control来分析启动时的长时间挂起(大约5秒)我的用户界面。
I used JFR (Java Flight Recorder) and Oracle Mission Control to analyse a long hang (about 5s) on startup of our UI.
到目前为止我的发现是方法 Permissions.implies()
需要很长时间才能获得UNK nown原因。
My finding so far is that the method Permissions.implies()
takes extremely long for an unknown reason.
我的分析显示2个不同线程的2个长阻塞堆栈,两个线程都挂得很长(大约2s& 4s)在这个方法中。
My analysis showed 2 long blocked stacks for 2 different threads which both were hanging long (about 2s & 4s) in this method.
这是JMC隔离的一个调用堆栈:(供参考:4.340.000.123ns = 4.34s)
Here is one call stack that JMC isolated: (For reference: 4.340.000.123ns = 4.34s)
Stack Trace Count Duration (ns)
java.security.Permissions.implies(Permission) 1 4.340.000.123
sun.security.provider.PolicyFile.implies(ProtectionDomain, Permission) 1 4.340.000.123
java.security.ProtectionDomain.implies(Permission) 1 4.340.000.123
java.security.AccessControlContext.checkPermission(Permission) 1 4.340.000.123
java.security.AccessController.checkPermission(Permission) 1 4.340.000.123
java.lang.SecurityManager.checkPermission(Permission) 1 4.340.000.123
sun.plugin2.applet.AWTAppletSecurityManager.checkPermission(Permission) 1 4.340.000.123
java.lang.SecurityManager.hasAllPermission() 1 4.340.000.123
java.lang.SecurityManager.currentClassLoader() 1 4.340.000.123
sun.plugin2.applet.AWTAppletSecurityManager.getCurrentClassLoader() 1 4.340.000.123
sun.plugin2.applet.AWTAppletSecurityManager.getThreadGroup() 1 4.340.000.123
java.lang.Thread.init(ThreadGroup, Runnable, String, long, AccessControlContext) 1 4.340.000.123
java.lang.Thread.init(ThreadGroup, Runnable, String, long) 1 4.340.000.123
java.lang.Thread.<init>(String) 1 4.340.000.123
MyClass2.<init>() 1 4.340.000.123
MyClass.treatNew(Protocol) 1 4.340.000.123
MyClass.treatNewDecode(String, int) 1 4.340.000.123
MyClass.run() 1 4.340.000.123
java.lang.Thread.run() 1 4.340.000.123
这篇关于Java 8u 45上的Applet加载非常慢,堆栈溢出错误,而它与Java 7一起工作正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!