小程序在 Java 8u 45 上加载非常慢,出现堆栈溢出错误,而在 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 上通过网络打开小程序时,我在 Java 控制台上收到 Stackoverflow 错误.小程序被加载,但需要大约 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 中使用小程序.当前测试版本:
We are using an applet in Firefox. Current Testing versions:
- 火狐:46.0.1
- Java:jre1.8.0_51(32 位)
我使用 JFR(Java Flight Recorder)和 Oracle Mission Control 分析了 UI 启动时的长时间挂起(大约 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()
由于未知原因需要很长时间.
My finding so far is that the method Permissions.implies()
takes extremely long for an unknown reason.
我的分析显示 2 个不同线程的 2 个长阻塞堆栈在这种方法中都挂了很长时间(大约 2 秒和 4 秒).
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 上加载非常慢,出现堆栈溢出错误,而在 Java 7 上运行良好的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!