6

java 7u45 带来的乐趣源源不断。这一次是 webstart 中的死锁。这在启动一个大型应用程序(约 100 个 jars)时非常一致地(每次)发生。

有没有其他人遇到过这个或知道任何解决方法?除了恢复到 1.7.0_40 之外?

谢谢,

Found one Java-level deadlock:
=============================
"Java Web Start Main Thread":
  waiting to lock monitor 0x066368bc (object 0x29e65428, a java.lang.Class),
  which is held by "Finalizer"
"Finalizer":
  waiting to lock monitor 0x00dbc954 (object 0x2a1b52b0, a com.sun.deploy.cache.CacheEntry),
  which is held by "Java Web Start Main Thread"

Java stack information for the threads listed above:
===================================================
"Java Web Start Main Thread":
    at com.sun.deploy.cache.MemoryCache.getLoadedResource(Unknown Source)
    - waiting to lock <0x29e65428> (a java.lang.Class for com.sun.deploy.cache.MemoryCache)
    at com.sun.deploy.cache.CachedJarFile.getCacheEntry(Unknown Source)
    - locked <0x24810058> (a com.sun.deploy.cache.CachedJarFile)
    at com.sun.deploy.cache.CachedJarFile.getManifest(Unknown Source)
    - locked <0x24810058> (a com.sun.deploy.cache.CachedJarFile)
    at com.sun.deploy.util.JarUtil.isBlobSigned(Unknown Source)
    at com.sun.deploy.cache.CacheEntry.getJarFile(Unknown Source)
    - locked <0x2a1b52b0> (a com.sun.deploy.cache.CacheEntry)
    at com.sun.deploy.security.DeployManifestChecker.verify(Unknown Source)
    at com.sun.javaws.security.AppPolicy.grantUnrestrictedAccess(Unknown Source)
    at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResourcesHelper(Unknown Source)
    at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.launch(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main.access$000(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
"Finalizer":
    at com.sun.deploy.cache.CacheEntry.storageFilesExist(Unknown Source)
    - waiting to lock <0x2a1b52b0> (a com.sun.deploy.cache.CacheEntry)
    at com.sun.deploy.cache.MemoryCache.validateResource(Unknown Source)
    at com.sun.deploy.cache.MemoryCache.getLoadedResource(Unknown Source)
    - locked <0x29e65428> (a java.lang.Class for com.sun.deploy.cache.MemoryCache)
    at com.sun.deploy.cache.CachedJarFile.isReferencedTo(Unknown Source)
    at com.sun.deploy.cache.CachedJarFile.close(Unknown Source)
    at java.util.zip.ZipFile.finalize(Unknown Source)
    at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
    at java.lang.ref.Finalizer.runFinalizer(Unknown Source)
    at java.lang.ref.Finalizer.access$100(Unknown Source)
    at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

Found 1 deadlock.
4

1 回答 1

1

我在评论中提到的错误报告现已被接受。

不过,看起来它的 ID 在该过程中发生了变化。它从JI-命名空间移动到JDK-命名空间:https://bugs.openjdk.java.net/browse/JI-9007571现在重定向到https://bugs.openjdk.java.net/browse/JDK-8027029。现在也可以在http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8027029上看到该问题。

该修复似乎正在讨论中,以纳入 7u51,将于 1 月到期。

我们的堆栈跟踪是相似的——死锁本身似乎是相同的。在我们的例子中,页面中有两个同时加载的小程序。

"thread applet-cl.applet.TutorApplet-2" prio=4 tid=0x04f21000 nid=0x528 waiting for monitor entry [0x0652f000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at com.sun.deploy.cache.MemoryCache.getLoadedResource(Unknown Source)
    - waiting to lock <0x29d288b8> (a java.lang.Class for com.sun.deploy.cache.MemoryCache)
    at com.sun.deploy.cache.CachedJarFile.getCacheEntry(Unknown Source)
    - locked <0x247a4f90> (a com.sun.deploy.cache.CachedJarFile)
    at com.sun.deploy.cache.CachedJarFile.getManifest(Unknown Source)
    - locked <0x247a4f90> (a com.sun.deploy.cache.CachedJarFile)
    at com.sun.deploy.util.JarUtil.isBlobSigned(Unknown Source)
    at com.sun.deploy.cache.CacheEntry.getJarFile(Unknown Source)
    - locked <0x29eccc00> (a com.sun.deploy.cache.CacheEntry)
    at com.sun.javaws.security.SigningInfo.check(Unknown Source)
    at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResourcesHelper(Unknown Source)
    at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResources(Unknown Source)
    at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
    at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

"thread applet-cl.applet.TTSApplet-1" prio=4 tid=0x04f1f800 nid=0xa40 waiting for monitor entry [0x0600f000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at com.sun.deploy.cache.CacheEntry.storageFilesExist(Unknown Source)
    - waiting to lock <0x29eccc00> (a com.sun.deploy.cache.CacheEntry)
    at com.sun.deploy.cache.MemoryCache.validateResource(Unknown Source)
    at com.sun.deploy.cache.MemoryCache.getLoadedResource(Unknown Source)
    - locked <0x29d288b8> (a java.lang.Class for com.sun.deploy.cache.MemoryCache)
    at com.sun.deploy.cache.MemoryCache.getLoadedResource(Unknown Source)
    - locked <0x29d288b8> (a java.lang.Class for com.sun.deploy.cache.MemoryCache)
    at com.sun.deploy.cache.Cache.getCacheEntry(Unknown Source)
    at com.sun.deploy.cache.Cache.getCacheEntry(Unknown Source)
    at com.sun.deploy.cache.Cache.getCachedResourceFilePath(Unknown Source)
    at com.sun.deploy.cache.ResourceProviderImpl.getCachedResourceFilePath(Unknown Source)
    at com.sun.javaws.security.JNLPSignedResourcesHelper.getSignedJNLPBits(Unknown Source)
    at com.sun.javaws.security.JNLPSignedResourcesHelper.getSignedJNLPFile(Unknown Source)
    at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedLaunchDescHelper(Unknown Source)
    at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedLaunchDesc(Unknown Source)
    at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
    at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
于 2013-11-01T15:29:43.743 回答