This discussion is archived
5 Replies Latest reply: Oct 20, 2010 6:27 AM by 801338 RSS

Upgraded to JRE 1.6. Applet on close makes CPU go 100%

843804 Newbie
Currently Being Moderated
In the application I am working on, a JSP loads a signed applet using object tag. Applet spawns some swingworker threads. The applet runs fine but as soon as the browser is closed, the CPU utilization spikes to 100% and stays till all browser windows are closed. This started happening after upgrading the JRE from 1.4.2_13 to 1.6.0_02. In Windows Task manager, I can see most of the CPU time being taken up by IEXPLORE.EXE and System

Any help on resolving this issue is highly appreciated.

Thanks
  • 1. Re: Upgraded to JRE 1.6. Applet on close makes CPU go 100%
    843804 Newbie
    Currently Being Moderated
    Though it doesn't initially seem like it, it mite be worth checking garbage collection, can usually be one of the reasons for CPU spikes.
  • 2. Re: Upgraded to JRE 1.6. Applet on close makes CPU go 100%
    843804 Newbie
    Currently Being Moderated
    Below is the thread stack dump. I am not sure how to interpret the problem threads. Can someone help please...
    Dump thread stack ...
    ----------------------------------------------------
    Full thread dump Java HotSpot(TM) Client VM (10.0-b19 mixed mode, sharing):
    
    "TimerQueue" daemon prio=6 tid=0x08ff4000 nid=0xb5c in Object.wait() [0x462cf000..0x462cfb14]
       java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x217a02a8> (a javax.swing.TimerQueue)
         at javax.swing.TimerQueue.run(Unknown Source)
         - locked <0x217a02a8> (a javax.swing.TimerQueue)
         at java.lang.Thread.run(Unknown Source)
    
    "ConsoleWriterThread" daemon prio=6 tid=0x09d9b800 nid=0xb58 in Object.wait() [0x461cf000..0x461cfb94]
       java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x21150e20> (a java.lang.Object)
         at java.lang.Object.wait(Object.java:485)
         at com.sun.deploy.util.ConsoleTraceListener$ConsoleWriterThread.run(Unknown Source)
         - locked <0x21150e20> (a java.lang.Object)
    
    "AWT-EventQueue-1" prio=6 tid=0x09d03400 nid=0x7f8 runnable [0x460cf000..0x460cfc14]
       java.lang.Thread.State: RUNNABLE
         at com.sun.deploy.util.ConsoleHelper.dumpAllStacksImpl(Native Method)
         at com.sun.deploy.util.ConsoleHelper.dumpAllStacks(Unknown Source)
         at sun.plugin.util.PluginConsoleController.dumpAllStacks(Unknown Source)
         at com.sun.deploy.util.ConsoleWindow$2.actionPerformed(Unknown Source)
         at javax.swing.JComponent$ActionStandin.actionPerformed(Unknown Source)
         at javax.swing.SwingUtilities.notifyAction(Unknown Source)
         at javax.swing.JComponent.processKeyBinding(Unknown Source)
         at javax.swing.KeyboardManager.fireBinding(Unknown Source)
         at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
         at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
         at javax.swing.JComponent.processKeyBindings(Unknown Source)
         at javax.swing.JComponent.processKeyEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    
    "Thread-12" prio=6 tid=0x09e61800 nid=0x16c runnable [0x00000000..0x09fbf760]
       java.lang.Thread.State: RUNNABLE
    
    "p: default-threadpool; w: Idle" daemon prio=4 tid=0x0af26800 nid=0x1c4 in Object.wait() [0x0cb1f000..0x0cb1fc94]
       java.lang.Thread.State: TIMED_WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x2148a9a8> (a com.sun.corba.se.impl.orbutil.threadpool.WorkQueueImpl)
         at com.sun.corba.se.impl.orbutil.threadpool.WorkQueueImpl.requestWork(Unknown Source)
         - locked <0x2148a9a8> (a com.sun.corba.se.impl.orbutil.threadpool.WorkQueueImpl)
         at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(Unknown Source)
    
    "p: default-threadpool; w: Idle" daemon prio=4 tid=0x0afab400 nid=0xa74 in Object.wait() [0x0ca1f000..0x0ca1fd14]
       java.lang.Thread.State: TIMED_WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x2148a9a8> (a com.sun.corba.se.impl.orbutil.threadpool.WorkQueueImpl)
         at com.sun.corba.se.impl.orbutil.threadpool.WorkQueueImpl.requestWork(Unknown Source)
         - locked <0x2148a9a8> (a com.sun.corba.se.impl.orbutil.threadpool.WorkQueueImpl)
         at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(Unknown Source)
    
    "p: default-threadpool; w: Idle" daemon prio=4 tid=0x09cc9c00 nid=0xb28 in Object.wait() [0x0c71f000..0x0c71fa94]
       java.lang.Thread.State: TIMED_WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x2148a9a8> (a com.sun.corba.se.impl.orbutil.threadpool.WorkQueueImpl)
         at com.sun.corba.se.impl.orbutil.threadpool.WorkQueueImpl.requestWork(Unknown Source)
         - locked <0x2148a9a8> (a com.sun.corba.se.impl.orbutil.threadpool.WorkQueueImpl)
         at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(Unknown Source)
    
    "SelectorThread" daemon prio=4 tid=0x09cc6000 nid=0x90c runnable [0x0c61f000..0x0c61fb14]
       java.lang.Thread.State: RUNNABLE
         at sun.nio.ch.WindowsSelectorImpl.setWakeupSocket0(Native Method)
         at sun.nio.ch.WindowsSelectorImpl.setWakeupSocket(Unknown Source)
         at sun.nio.ch.WindowsSelectorImpl.wakeup(Unknown Source)
         - locked <0x214ce178> (a java.lang.Object)
         at java.nio.channels.spi.AbstractSelector$1.interrupt(Unknown Source)
         at java.nio.channels.spi.AbstractSelector.begin(Unknown Source)
         at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
         at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
         - locked <0x214ce0b0> (a sun.nio.ch.Util$1)
         - locked <0x214ce0a0> (a java.util.Collections$UnmodifiableSet)
         - locked <0x214cb860> (a sun.nio.ch.WindowsSelectorImpl)
         at sun.nio.ch.SelectorImpl.select(Unknown Source)
         at com.sun.corba.se.impl.transport.SelectorImpl.run(Unknown Source)
    
    "AWT-EventQueue-0" prio=6 tid=0x09e4ec00 nid=0x9a0 in Object.wait() [0x0a90f000..0x0a90fd94]
       java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x2110c380> (a java.awt.EventQueue)
         at java.lang.Object.wait(Object.java:485)
         at java.awt.EventQueue.getNextEvent(Unknown Source)
         - locked <0x2110c380> (a java.awt.EventQueue)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    
    "traceMsgQueueThread" daemon prio=6 tid=0x090b7800 nid=0x9f4 in Object.wait() [0x09cbf000..0x09cbfa14]
       java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x21118d78> (a java.util.ArrayList)
         at java.lang.Object.wait(Object.java:485)
         at com.sun.deploy.util.Trace$TraceMsgQueueChecker.run(Unknown Source)
         - locked <0x21118d78> (a java.util.ArrayList)
         at java.lang.Thread.run(Unknown Source)
    
    "AWT-Windows" daemon prio=6 tid=0x090ab800 nid=0xac8 runnable [0x09bbf000..0x09bbfa94]
       java.lang.Thread.State: RUNNABLE
         at sun.awt.windows.WToolkit.eventLoop(Native Method)
         at sun.awt.windows.WToolkit.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    
    "AWT-Shutdown" prio=6 tid=0x090aac00 nid=0x4e4 in Object.wait() [0x09abf000..0x09abfb14]
       java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x211174e8> (a java.lang.Object)
         at java.lang.Object.wait(Object.java:485)
         at sun.awt.AWTAutoShutdown.run(Unknown Source)
         - locked <0x211174e8> (a java.lang.Object)
         at java.lang.Thread.run(Unknown Source)
    
    "Java2D Disposer" daemon prio=10 tid=0x090a9400 nid=0x918 in Object.wait() [0x099bf000..0x099bfb94]
       java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x21117578> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         - locked <0x21117578> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         at sun.java2d.Disposer.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    
    "Low Memory Detector" daemon prio=6 tid=0x08ffac00 nid=0x7e0 runnable [0x00000000..0x00000000]
       java.lang.Thread.State: RUNNABLE
    
    "CompilerThread0" daemon prio=10 tid=0x08fecc00 nid=0xa00 waiting on condition [0x00000000..0x096bf6bc]
       java.lang.Thread.State: RUNNABLE
    
    "Attach Listener" daemon prio=10 tid=0x08feb800 nid=0x4bc runnable [0x00000000..0x00000000]
       java.lang.Thread.State: RUNNABLE
    
    "Signal Dispatcher" daemon prio=10 tid=0x08fea800 nid=0x5e4 runnable [0x00000000..0x00000000]
       java.lang.Thread.State: RUNNABLE
    
    "Finalizer" daemon prio=8 tid=0x08fe6400 nid=0xb20 in Object.wait() [0x093bf000..0x093bfa94]
       java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x211177a8> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         - locked <0x211177a8> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
    
    "Reference Handler" daemon prio=10 tid=0x08fe2000 nid=0x778 in Object.wait() [0x092bf000..0x092bfb14]
       java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x21117830> (a java.lang.ref.Reference$Lock)
         at java.lang.Object.wait(Object.java:485)
         at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
         - locked <0x21117830> (a java.lang.ref.Reference$Lock)
    
    "VM Thread" prio=10 tid=0x08fe0c00 nid=0x9ec runnable 
    
    "VM Periodic Task Thread" prio=10 tid=0x08ffbc00 nid=0x98c waiting on condition 
    
     (a java.lang.ref.Reference$Lock)
    
    "VM Thread" prio=10 tid=0x08fe0c00 nid=0x9ec runnable 
    
    "VM Periodic Task Thread" prio=10 tid=0x08ffbc00 nid=0x98c waiting on condition 
    
    ----------------------------------------------------
    Done.
  • 3. Re: Upgraded to JRE 1.6. Applet on close makes CPU go 100%
    843804 Newbie
    Currently Being Moderated
    If I use the latest beta JRE from Sun it works fine (as it used to in 1.4.2_13). Version 6 Update 10 (build 1.6.0_10-beta-b14) is the JRE that has the fix needed. I hope Sun carries along this fix into the public version.

    Thanks.
  • 4. Re: Upgraded to JRE 1.6. Applet on close makes CPU go 100%
    843804 Newbie
    Currently Being Moderated
    With the latest release of 1.6.0_20, this problem has resurfaced. Is Oracle going to address this or there some work around?
  • 5. Re: Upgraded to JRE 1.6. Applet on close makes CPU go 100%
    801338 Newbie
    Currently Being Moderated
    SunForumsGuest wrote:
    With the latest release of 1.6.0_20, this problem has resurfaced. Is Oracle going to address this or there some work around?
    I realize this response is way, way late, but perhaps someone might benefit. Can you add anything to your applet's stop() and destroy() methods to insure clean quiescence and force itself dead on exit? See:

    * http://download.oracle.com/javase/tutorial/deployment/applet/appletMethods.html

    -- Rich