Skip to main content

Plugin2 fails to load with large applet parameter

8 replies [Last post]
andrewherron
Offline
Joined: 2008-04-03

The application I work on tends to load large amounts of plain text via applet parameters. With 6u10 and plugin2 on IE8 or FireFox 3, a relatively small 22kb param tag causes the JRE to fail to load - no errors, no logs created in the deployment/logs folder.

Works fine on IE6 and IE7, switching back to the classic plugin works everywhere.

Replication case:
http://www.ephox.com/testing/largeParam.html

(HTML used to load the applet is generated in JavaScript, that test page also writes a copy into the textarea at the bottom of the page)

Only workaround is to load Java first (just hit the main page at http://www.ephox.com - we use a tiny applet to kickstart the JVM) and then hit the replication case, it will load without any issues.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
andrewherron
Offline
Joined: 2008-04-03

Just to tie this one up, I've confirmed the issue was fixed in b23.

andrewherron
Offline
Joined: 2008-04-03

Is this the right place to get it looked at or should I be logging it directly on bugs.sun.com?

kbr
Offline
Joined: 2003-06-16

Sorry for the delay in replying. It's been very busy around here recently. I'm not sure how I missed your original post.

We're looking into this issue (which may have the same root cause as already-filed bug 6678865) and will let you know what we find soon.

Generally this forum is a faster conduit to report bugs, but please feel free to both post here and file bugs via bugs.sun.com.

andrewherron
Offline
Joined: 2008-04-03

Hey, no problem. I can understand life must be pretty busy with a public beta like this :)

Certainly sounds like the same cause, although it is possible to load our test case after the JVM has started. I also noticed that when the JVM fails to load, there is an applet-sized hole on the page (right clicking doesn't bring up the browser context menu).

I hadn't considered that with the new separate-process plugin structure you'd be using the command line for applet params. I've seen customers loading some really hefty documents into our editor, if this is going to be a problem we may have to consider a switch to LiveConnect for 6u10 ;)

kbr
Offline
Joined: 2003-06-16

We're not passing the applet parameters on the command line. There appears to be a bug in our inter-process communication mechanism on Windows where a large amount of data being sent over the wire is causing data corruption. You shouldn't need to change your applet. I'll get to the bottom of this today or tomorrow.

andrewherron
Offline
Joined: 2008-04-03

sweet, thanks for the update :D

kbr
Offline
Joined: 2003-06-16

OK, I seem to have things working but your applet is doing some evil things with focus transfers where you are locking up the browser good and hard. You need to change your Java-side code which handles the focusGained() call from JavaScript to use EventQueue.invokeLater(). Otherwise you are setting up a dependence loop involving the browser, the AWT and your code which simply put causes a huge deadlock due to WM_FOCUS messages not being processed. Here is a thread dump showing the problem. Look at the thread "Applet 2 LiveConnect Worker Thread".

Please email me at kenneth dot russell at sun dot com and I will get you a binary with which you can verify this fix.

2008-04-12 22:37:20
Full thread dump Java HotSpot(TM) Client VM (11.0-b09 mixed mode):

"Thread-13" daemon prio=4 tid=0x0c56f400 nid=0x508 in Object.wait() [0x0cc8f000..0x0cc8fb14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x03b1ac38> (a com.ephox.editlive.common.pool.WorkerThread)
at java.lang.Object.wait(Object.java:485)
at com.ephox.editlive.common.pool.WorkerThread.run(WorkerThread.java:38)
- locked <0x03b1ac38> (a com.ephox.editlive.common.pool.WorkerThread)

"Thread-12" daemon prio=4 tid=0x0c48a400 nid=0xfdc in Object.wait() [0x0c31f000..0x0c31fc14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x03511670> (a com.ephox.editlive.common.pool.WorkerThread)
at java.lang.Object.wait(Object.java:485)
at com.ephox.editlive.common.pool.WorkerThread.run(WorkerThread.java:38)
- locked <0x03511670> (a com.ephox.editlive.common.pool.WorkerThread)

"Thread-11" daemon prio=4 tid=0x0b78a800 nid=0xbb0 in Object.wait() [0x0cbef000..0x0cbefc94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x03500378> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0x03500378> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at com.ephox.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ReferenceQueueThread.run(MultiThreadedHttpConnectionManager.java:630)

"TimerQueue" daemon prio=6 tid=0x0b7a6400 nid=0x6dc in Object.wait() [0x0c36f000..0x0c36fd14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x03222488> (a javax.swing.TimerQueue)
at javax.swing.TimerQueue.run(TimerQueue.java:236)
- locked <0x03222488> (a javax.swing.TimerQueue)
at java.lang.Thread.run(Thread.java:619)

"TimerQueue" daemon prio=4 tid=0x0b87e400 nid=0x4d8 in Object.wait() [0x0c2bf000..0x0c2bfa14]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at javax.swing.TimerQueue.run(TimerQueue.java:236)
- locked <0x031ebe28> (a javax.swing.TimerQueue)
at java.lang.Thread.run(Thread.java:619)

"thread applet-com.ephox.editlive.win.EditLiveJava-1" prio=4 tid=0x0b70fc00 nid=0xa90 in Object.wait() [0x0bb8f000..0x0bb8fc14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x03034d50> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1402)
- locked <0x03034d50> (a java.lang.Object)
at java.lang.Thread.run(Thread.java:619)

"Applet 2 LiveConnect Worker Thread" prio=4 tid=0x0b2d2400 nid=0x35c runnable [0x0b32e000..0x0b32fc94]
java.lang.Thread.State: RUNNABLE
at sun.awt.windows.WComponentPeer._requestFocus(Native Method)
at sun.awt.windows.WComponentPeer.requestFocus(WComponentPeer.java:593)
at java.awt.Component.requestFocusHelper(Component.java:7225)
at java.awt.Component.requestFocusHelper(Component.java:7186)
at java.awt.Component.requestFocus(Component.java:6994)
at javax.swing.JComponent.requestFocus(JComponent.java:1449)
at com.ephox.editlive.java2.editor.EPane.requestFocus(EPane.java:5010)
at com.ephox.editlive.java2.editor.Editor.setFocusToEPane(Editor.java:407)
at com.ephox.editlive.applets.ELJApplet.focusGained(ELJApplet.java:2092)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.plugin.javascript.JSInvoke.invoke(JSInvoke.java:20)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.plugin.javascript.JSClassLoader.invoke(JSClassLoader.java:72)
at sun.plugin2.liveconnect.JavaClass$MethodInfo.invoke(JavaClass.java:131)
at sun.plugin2.liveconnect.JavaClass$MemberBundle.invoke(JavaClass.java:344)
at sun.plugin2.liveconnect.JavaClass.invoke(JavaClass.java:480)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$1.run(LiveConnectSupport.java:419)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo.doObjectOp(LiveConnectSupport.java:417)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$LiveConnectWorker.run(LiveConnectSupport.java:775)
at java.lang.Thread.run(Thread.java:619)

"Windows Tray Icon Thread" prio=6 tid=0x0b6ec000 nid=0xb58 runnable [0x0bfff000..0x0bfffd94]
java.lang.Thread.State: RUNNABLE
at com.sun.deploy.ui.WindowsJavaTrayIcon.mainLoop(Native Method)
at com.sun.deploy.ui.WindowsJavaTrayIcon.access$700(WindowsJavaTrayIcon.java:18)
at com.sun.deploy.ui.WindowsJavaTrayIcon$2.run(WindowsJavaTrayIcon.java:97)
at java.lang.Thread.run(Thread.java:619)

"ConsoleWriterThread" daemon prio=6 tid=0x0b6e0400 nid=0x144 in Object.wait() [0x0bfaf000..0x0bfafa14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x02ef88a8> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at com.sun.deploy.util.ConsoleTraceListener$ConsoleWriterThread.run(ConsoleTraceListener.java:72)
- locked <0x02ef88a8> (a java.lang.Object)

"AWT-EventQueue-2" prio=6 tid=0x0b682400 nid=0x3b4 runnable [0x0bd1f000..0x0bd1fc94]
java.lang.Thread.State: RUNNABLE
at sun.awt.windows.WComponentPeer.nativeHandleEvent(Native Method)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:322)
at sun.awt.windows.WWindowPeer.handleEvent(WWindowPeer.java:697)
at java.awt.Component.dispatchEventImpl(Component.java:4542)
at java.awt.Container.dispatchEventImpl(Container.java:2119)
at java.awt.Window.dispatchEventImpl(Window.java:2458)
at java.awt.Component.dispatchEvent(Component.java:4296)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:889)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:646)
at java.awt.Component.dispatchEventImpl(Component.java:4338)
at java.awt.Container.dispatchEventImpl(Container.java:2119)
at java.awt.Window.dispatchEventImpl(Window.java:2458)
at java.awt.Component.dispatchEvent(Component.java:4296)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.SequencedEvent.dispatch(SequencedEvent.java:98)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:284)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

"Browser Side Object Cleanup Thread" prio=6 tid=0x0b681400 nid=0xdbc in Object.wait() [0x0bccf000..0x0bccfb94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x02f31810> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0x02f31810> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at sun.plugin2.main.client.LiveConnectSupport$BrowserSideObjectCleanupThread.run(LiveConnectSupport.java:211)

"CacheCleanUpThread" daemon prio=6 tid=0x0b671800 nid=0xb6c in Object.wait() [0x0bc7f000..0x0bc7fd14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x02f31830> (a com.sun.deploy.cache.CleanupThread)
at java.lang.Object.wait(Object.java:485)
at com.sun.deploy.cache.CleanupThread.run(CleanupThread.java:219)
- locked <0x02f31830> (a com.sun.deploy.cache.CleanupThread)

"CacheMemoryCleanUpThread" prio=6 tid=0x0b66b800 nid=0x954 in Object.wait() [0x0bc2f000..0x0bc2fc14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x02f31928> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0x02f31928> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at com.sun.deploy.cache.MemoryCache$LoadedResourceCleanupThread.run(MemoryCache.java:202)

"AWT-EventQueue-1" prio=4 tid=0x0b2da400 nid=0xc5c in Object.wait() [0x0bbdf000..0x0bbdfb94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at java.awt.EventQueue.getNextEvent(EventQueue.java:479)
- locked <0x02f31ae8> (a java.awt.EventQueue)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:251)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

"AWT-EventQueue-0" prio=6 tid=0x0b156800 nid=0x448 in Object.wait() [0x0baef000..0x0baefd14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x02eed180> (a java.awt.EventQueue)
at java.lang.Object.wait(Object.java:485)
at java.awt.EventQueue.getNextEvent(EventQueue.java:479)
- locked <0x02eed180> (a java.awt.EventQueue)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:251)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

"Java Plug-In Heartbeat Thread" prio=6 tid=0x0b155400 nid=0xe54 waiting on condition [0x0bb3f000..0x0bb3fd94]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at sun.plugin2.main.client.PluginMain$HeartbeatThread.run(PluginMain.java:1423)

"AWT-Windows" daemon prio=6 tid=0x0b2ce800 nid=0xf6c runnable [0x0ba9f000..0x0ba9fa94]
java.lang.Thread.State: RUNNABLE
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(WToolkit.java:291)
at java.lang.Thread.run(Thread.java:619)

"AWT-Shutdown" prio=6 tid=0x0b124800 nid=0x7e4 in Object.wait() [0x0b5ff000..0x0b5ffb14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x02eed340> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
- locked <0x02eed340> (a java.lang.Object)
at java.lang.Thread.run(Thread.java:619)

"Java2D Disposer" daemon prio=10 tid=0x0b660400 nid=0x9d4 in Object.wait() [0x0b5af000..0x0b5afb94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x02eed3d0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0x02eed3d0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at sun.java2d.Disposer.run(Disposer.java:125)
at java.lang.Thread.run(Thread.java:619)

"Java Plug-In Pipe Worker Thread (Client-Side)" prio=6 tid=0x0ab4a800 nid=0xd40 runnable [0x0b37f000..0x0b37fc14]
java.lang.Thread.State: RUNNABLE
at sun.plugin2.os.windows.Windows.ReadFile0(Native Method)
at sun.plugin2.os.windows.Windows.ReadFile(Windows.java:153)
at sun.plugin2.ipc.windows.WindowsNamedPipe.read(WindowsNamedPipe.java:127)
at sun.plugin2.message.transport.NamedPipeTransport$SerializerImpl.read(NamedPipeTransport.java:89)
at sun.plugin2.message.transport.NamedPipeTransport$SerializerImpl.readByte(NamedPipeTransport.java:115)
at sun.plugin2.message.AbstractSerializer.readInt(AbstractSerializer.java:167)
at sun.plugin2.message.transport.SerializingTransport.read(SerializingTransport.java:89)
at sun.plugin2.message.Pipe$WorkerThread.run(Pipe.java:179)

"traceMsgQueueThread" daemon prio=6 tid=0x0aacd800 nid=0xb34 in Object.wait() [0x0b0df000..0x0b0dfd14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x02ef22f0> (a java.util.ArrayList)
at java.lang.Object.wait(Object.java:485)
at com.sun.deploy.util.Trace$TraceMsgQueueChecker.run(Trace.java:79)
- locked <0x02ef22f0> (a java.util.ArrayList)
at java.lang.Thread.run(Thread.java:619)

"Timer-0" prio=6 tid=0x0aafdc00 nid=0x864 in Object.wait() [0x0b08f000..0x0b08fd94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x02eed618> (a java.util.TaskQueue)
at java.lang.Object.wait(Object.java:485)
at java.util.TimerThread.mainLoop(Timer.java:483)
- locked <0x02eed618> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:462)

"Low Memory Detector" daemon prio=6 tid=0x0aaaf400 nid=0xcb4 runnable [0x00000000..0x00000000]
java.lang.Thread.State: RUNNABLE

"CompilerThread0" daemon prio=10 tid=0x0aaa9400 nid=0x55c waiting on condition [0x00000000..0x0ad2f7bc]
java.lang.Thread.State: RUNNABLE

"Attach Listener" daemon prio=10 tid=0x0aaa7800 nid=0xf08 waiting on condition [0x00000000..0x00000000]
java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=10 tid=0x0aaa6400 nid=0xddc runnable [0x00000000..0x00000000]
java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=8 tid=0x0aa96800 nid=0x67c in Object.wait() [0x0ac3f000..0x0ac3fc94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x02eed830> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0x02eed830> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x0aa92000 nid=0x418 in Object.wait() [0x0abef000..0x0abefd14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x02eed100> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <0x02eed100> (a java.lang.ref.Reference$Lock)

"main" prio=6 tid=0x00297400 nid=0x7c4 in Object.wait() [0x0090f000..0x0090fe54]

java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at sun.plugin2.message.Queue.waitForMessage(Queue.java:61)
- locked <0x02ea5800> (a sun.plugin2.message.Queue)
at sun.plugin2.message.Pipe.receive(Pipe.java:92)
at sun.plugin2.main.client.PluginMain.mainLoop(PluginMain.java:416)
at sun.plugin2.main.client.PluginMain.run(PluginMain.java:311)
at sun.plugin2.main.client.PluginMain.main(PluginMain.java:1667)

"VM Thread" prio=10 tid=0x0aa88c00 nid=0x9d0 runnable

"VM Periodic Task Thread" prio=10 tid=0x0aab1400 nid=0xae0 waiting on condition

JNI global references: 1472

andrewherron
Offline
Joined: 2008-04-03

Yeah we changed some focus stuff in our release about a week ago, it seems to get lucky in most cases but we've already had one report of it locking up. Thanks for pointing out the problem :)