EVALUATION
From Thomas Ng:
This is an regression caused by
6518576: Graphics icon not displayed while Java Web Start launch an application with JDK 6.
We are trying to remove a JAR file, but the JAR is not closed yet, and hence when we try to remove it, we got the exception with the new FileLock code:
java.nio.channels.OverlappingFileLockException
at sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(Unknown Source)
at sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(Unknown Source)
at sun.nio.ch.FileChannelImpl.lock(Unknown Source)
at com.sun.deploy.cache.CacheEntry.lockFile(Unknown Source)
at com.sun.deploy.cache.CacheEntry.readManifest(Unknown Source)
at com.sun.deploy.cache.CacheEntry.access$300(Unknown Source)
at com.sun.deploy.cache.CacheEntry$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.cache.CacheEntry.getJarFile(Unknown Source)
at com.sun.deploy.cache.Cache.removeCacheEntryImpl(Unknown Source)
at com.sun.deploy.cache.Cache.access$100(Unknown Source)
at com.sun.deploy.cache.Cache$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.cache.Cache.removeCacheEntry(Unknown Source)
at com.sun.deploy.cache.Cache.removeCacheEntry(Unknown Source)
at com.sun.deploy.cache.CacheEntry.writeFileToDisk(Unknown Source)
at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source)
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
at com.sun.javaws.Launcher.downloadResources(Unknown Source)
at com.sun.javaws.Launcher.prepareLaunchFile(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$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
CacheEntry.lockFile is spinning, hoping it will be able to get the lock sometime, which it won't, and therefore the hang.
This is because in CacheEntry.writeFileToDisk, once we got the badcert exception, we try to remove the bad jar, without actually closing it first. So with the new locking code, we run into the hang.
I have a simple fix available. In CacheEntry.writeFileToDisk, once we got the exception, we should close the JAR before we try to remove the JAR.
Please file a new bug for this. We need to put in a fix for both 6u2 b02 and JDK 7.
|