JDK-6723194 : Reliability problems launching multiple applets on the same web page
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u10
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-07-07
  • Updated: 2010-09-08
  • Resolved: 2008-07-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6u10 b28Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Reliability problems have been seen in recent builds of the new Java Plug-In when launching multiple applets on the same web page. Applets occasionally fail to load, and in some situations, hangs have been seen where the applets are waiting for a cookie or proxy lookup where the browser never replies. In the latter situation, the debug console (JPI_PLUGIN2_DEBUG) indicates that an InternalError was thrown for a NULL plugin instance.

Throwing an InternalError on the JVMInstance's worker thread is extremely dangerous. It causes the thread to exit and therefore to silently ignore all further requests from applets launched in that JVM instance, leading to hangs starting applets.

At a minimum, the InternalErrors being thrown in the JVMInstance need to be changed in a way that the errors are reported without causing complete failure, and ideally that if they are being produced as a part of a lookup on behalf of an attached JVM instance, that a no-op result (like an empty proxy list) be returned so that the JVM instance making the request does not hang indefinitely waiting for a reply.

The issues in this area appear to be relatively recent regressions. The problem seems to reproduce most easily by quitting the browser, clearing the Java cache, and launching the Scene Graph applets from the demo section of the new plug-in's release notes. 6u10 build 25 appears to launch these applets reliably but 6u10 build 27 seems to have reliability problems. However, the problems are only intermittently reproducible. Even if the problem can not be reproduced reliably, the InternalError issue above needs to be fixed as it has been seen in real-world situations and causes complete failure of the Java Plug-In.
This issue may be related to the problems described in 6709817.

Comments
EVALUATION Recently (under 6705524) a couple of too-strong error checks were added to the browser side of the new plug-in's code which are throwing an Error and causing an important worker thread to exit abruptly. The side-effect of this is that all applets subsequently launched in that JVM instance hang during startup. These failures are intermittent but fairly reliably reproducible. The root cause of the error condition has not been fully determined and is being tracked for the next update release under 6727020. Changed the error checks to stop throwing exceptions. In the relaunch situations where the errors are reported, it appears that the applets may actually be loading fine; further investigation is needed to see whether duplicate relaunch messages may be incorrectly being sent. Verified manually with the Scene Graph demo applets from http://scenegraph-demos.dev.java.net/demo-applets.html that the error condition is seen but that the system recovers from it without subsequently hanging all applets.
18-07-2008