JDK-6995583 : interrupting a JSObject.call() in a waiting state leads to JVM shutdown
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u21
  • Priority: P2
  • Status: Closed
  • Resolution: Not an Issue
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2010-10-28
  • Updated: 2011-03-29
  • Resolved: 2011-03-29
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 JDK 7
6u21Resolved 7Resolved
Related Reports
Relates :  
Description
Some JSObject.call() sometimes never return from the browser side making the Applet stuck in a waiting state preventing further processing.

To prevent the observed behavior, customer has implemented a workaround consisting of interrupting the thread that is performing this JSObject.call() after 10s if no answer.
The side effect of this workaround is that it sometimes makes the JVMInstance to shutdown instead of continuing processing.

Full Java console and jpi log are attached. Here are the relevant extracts  :

java Console :

netscape.javascript.JSException
	at sun.plugin2.main.client.MessagePassingJSObject.newJSException(Unknown Source)
	at sun.plugin2.main.client.MessagePassingJSObject.waitForReply(Unknown Source)
	at sun.plugin2.main.client.MessagePassingJSObject.call(Unknown Source)
	at com.xxx.tct.data.common.BaseApplet$CallingJS.run(BaseApplet.java:232)
Caused by: java.lang.InterruptedException
	at java.lang.Object.wait(Native Method)
	at sun.plugin2.message.Queue.waitForMessage(Unknown Source)
	at sun.plugin2.message.Pipe.receive(Unknown Source)
	... 3 more
netscape.javascript.JSException
	at sun.plugin2.main.client.MessagePassingJSObject.newJSException(Unknown Source)
	at sun.plugin2.main.client.MessagePassingJSObject.waitForReply(Unknown Source)
	at sun.plugin2.main.client.MessagePassingJSObject.call(Unknown Source)
	at com.reuters.tct.data.common.BaseApplet$CallingJS.run(BaseApplet.java:232)
Caused by: java.lang.InterruptedException
	at java.lang.Object.wait(Native Method)
	at sun.plugin2.message.Queue.waitForMessage(Unknown Source)
	at sun.plugin2.message.Pipe.receive(Unknown Source)
	... 3 more


jpi.log :

java.lang.InterruptedException
Terminating Java Plug-In Pipe Worker Thread (Server-Side) due to exception:
at java.lang.Object.wait(Native Method)

        at sun.plugin2.message.Queue.waitForMessage(Unknown Source)JVM instance
for 1.6.0.17 exited

        at sun.plugin2.message.Pipe.receive(Unknown Source)
        at sun.plugin2.main.server.JVMInstance$WorkerThread.run(Unknown Source)
JVMInstance.unregisterApplet for applet ID 1java.io.IOException: Error 0 reading
 from named pipe, numRead 0, ReadFile ts: 2604717670958, now ts: 2604756574718,
dT 38903760

  LiveConnectSupport.shutdown(1)
        at sun.plugin2.ipc.windows.WindowsNamedPipe.read(Unknown Source)
  LiveConnectSupport: released [BrowserSideObject 0x267542c] for applet 1
at sun.plugin2.message.transport.NamedPipeTransport$SerializerImpl.read(Unknown
Source)

JVMInstance.unregisterApplet for applet ID 2    at sun.plugin2.message.transport
.NamedPipeTransport$SerializerImpl.readByte(Unknown Source)

  LiveConnectSupport.shutdown(2)        at sun.plugin2.message.AbstractSerialize
r.readInt(Unknown Source)

  LiveConnectSupport: released [BrowserSideObject 0x29b2860] for applet 2
at sun.plugin2.message.transport.SerializingTransport.read(Unknown Source)

  LiveConnectSupport: released [BrowserSideObject 0x267542c] for applet 2
        at sun.plugin2.message.Pipe$WorkerThread.run(Unknown Source)JVMInstance.
unregisterApplet for applet ID 3

  LiveConnectSupport.shutdown(3)
  LiveConnectSupport: released [BrowserSideObject 0x267542c] for applet 3
JVMInstance.unregisterApplet for applet ID 17
  LiveConnectSupport.shutdown(17)
  LiveConnectSupport: released [BrowserSideObject 0x26753c4] for applet 17

Comments
EVALUATION Some of the JScalls take long time. The customer hence interrupts such JScalls after waiting for 10s. During this wait, the client JVM misses sending the heartbeat response to the server side on time. Due to this, the pipe is broken and Plug-In Pipe Worker Thread terminates. This causes the JVM exit or shutdown
01-12-2010