views:

34

answers:

2

I have a desktop Java/Swing application which is deployed via Java Webstart (clients are using Java 6u20 on XP). I have received intermittent reports from users of the application hanging. I managed to log on to such a system during a hang found that the UI was not being drawn (as though EDT was blocked).

I used jstack to list the threads; I don't see any mention of deadlocks on the output and since I'm quite new to jstack I'm not sure what else I should be looking for.

I've had to edit the stack trace to allow it to fit within the stackoverflow limits, hopefully nothing of significance has been left out.

Thanks,
Phil

Full thread dump Java HotSpot(TM) Client VM (16.3-b01 mixed mode, sharing):

"AWT-EventQueue-0" prio=6 tid=0x03e3f000 nid=0xe44 in Object.wait() [0x0516f000]
   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(Unknown Source)
    - locked <0x1d4b91d8> (a java.awt.EventQueue)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    <SNIP>

   Locked ownable synchronizers:
    - None

"ServerThread" prio=6 tid=0x058f7c00 nid=0xa08 waiting for monitor entry [0x055be000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at com.sun.deploy.security.CPCallbackHandler$ParentCallback.check(Unknown Source)
    - waiting to lock <0x1d485f80> (a com.sun.deploy.security.CPCallbackHandler$ParentCallback)
    at com.sun.deploy.security.CPCallbackHandler$ParentCallback.access$1400(Unknown Source)
    at com.sun.deploy.security.CPCallbackHandler$ChildElement.checkResource(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader.checkResource(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader.findResource(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath.findResource(Unknown Source)
    at java.net.URLClassLoader$2.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findResource(Unknown Source)
    at com.sun.jnlp.JNLPClassLoader.findResource(Unknown Source)
    at java.lang.ClassLoader.getResource(Unknown Source)
    at com.sun.jnlp.JNLPClassLoader.access$001(Unknown Source)
    at com.sun.jnlp.JNLPClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.jnlp.JNLPClassLoader.getResource(Unknown Source)
    at java.lang.ClassLoader.getResourceAsStream(Unknown Source)
    at java.util.ResourceBundle$Control$1.run(Unknown Source)
    at java.util.ResourceBundle$Control$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.util.ResourceBundle$Control.newBundle(Unknown Source)
    at java.util.ResourceBundle.loadBundle(Unknown Source)
    at java.util.ResourceBundle.findBundle(Unknown Source)
    at java.util.ResourceBundle.findBundle(Unknown Source)
    at java.util.ResourceBundle.getBundleImpl(Unknown Source)
    at java.util.ResourceBundle.getBundle(Unknown Source)
    at org.apache.derby.iapi.services.i18n.MessageService.getBundleWithEnDefault(Unknown Source)
    at org.apache.derby.iapi.services.i18n.MessageService.getBundleForLocale(Unknown Source)
    at org.apache.derby.impl.services.monitor.BaseMonitor.getBundle(Unknown Source)
    at org.apache.derby.iapi.services.i18n.MessageService.getBundle(Unknown Source)
    at org.apache.derby.iapi.services.i18n.MessageService.getCompleteMessage(Unknown Source)
    at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
    at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
    at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
    at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
    - locked <0x1c233300> (a org.apache.derby.impl.jdbc.EmbedConnection40)
    at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
    <SNIP>

   Locked ownable synchronizers:
    - None

"ServerThread" prio=6 tid=0x058e7800 nid=0x2c0 waiting for monitor entry [0x082de000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at com.sun.deploy.security.CPCallbackHandler$ParentCallback.check(Unknown Source)
    - waiting to lock <0x1d485f80> (a com.sun.deploy.security.CPCallbackHandler$ParentCallback)
    at com.sun.deploy.security.CPCallbackHandler$ParentCallback.access$1400(Unknown Source)
    <SNIP>
    at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
    - locked <0x1c1bf748> (a org.apache.derby.impl.jdbc.EmbedConnection40)
    at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
    at com.foo.myapp.dataaccess.sql.PriceSql.<init>(PriceSql.java:120)
    at com.foo.myapp.dataaccess.sql.SqlServer.<init>(SqlServer.java:124)
    at com.foo.myapp.dataaccess.socket.ServerThread.run(ServerThread.java:154)

   Locked ownable synchronizers:
    - None

"ServerThread" prio=6 tid=0x04337000 nid=0xff4 waiting for monitor entry [0x0828e000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at com.sun.deploy.security.CPCallbackHandler$ParentCallback.check(Unknown Source)
    - waiting to lock <0x1d485f80> (a com.sun.deploy.security.CPCallbackHandler$ParentCallback)
    at com.sun.deploy.security.CPCallbackHandler$ParentCallback.access$1400(Unknown Source)
    <SNIP>
    at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
    - locked <0x1c176a80> (a org.apache.derby.impl.jdbc.EmbedConnection40)
    at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
    at com.foo.myapp.dataaccess.sql.PriceSql.<init>(PriceSql.java:201)
    at com.foo.myapp.dataaccess.sql.SqlServer.<init>(SqlServer.java:124)
    at com.foo.myapp.dataaccess.socket.ServerThread.run(ServerThread.java:154)

   Locked ownable synchronizers:
    - None

"ServerThread" prio=6 tid=0x05913400 nid=0xd5c in Object.wait() [0x0823e000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at com.sun.javaws.ui.JavawsSysRun.delegate(Unknown Source)
    - locked <0x1d430890> (a java.lang.Object)
    at com.sun.deploy.util.DeploySysRun.execute(Unknown Source)
    at com.sun.deploy.util.DeploySysRun$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.deploy.util.DeploySysRun.executePrivileged(Unknown Source)
    at com.sun.deploy.ui.UIFactory.showMixedCodeDialog(Unknown Source)
    at com.sun.deploy.security.CPCallbackHandler.showMixedTrustDialog(Unknown Source)
    at com.sun.deploy.security.CPCallbackHandler.access$1000(Unknown Source)
    <SNIP>
    at com.foo.myapp.dataaccess.sql.SqlServer.<init>(SqlServer.java:124)
    at com.foo.myapp.dataaccess.socket.ServerThread.run(ServerThread.java:154)

   Locked ownable synchronizers:
    - None

"ServerThread" prio=6 tid=0x043bd400 nid=0xb44 waiting for monitor entry [0x081ee000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at com.sun.deploy.security.CPCallbackHandler$ParentCallback.check(Unknown Source)
    - waiting to lock <0x1d485f80> (a com.sun.deploy.security.CPCallbackHandler$ParentCallback)
    at com.sun.deploy.security.CPCallbackHandler$ParentCallback.access$1400(Unknown Source)
    <SNIP>
    at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
    - locked <0x1c01d1f0> (a org.apache.derby.impl.jdbc.EmbedConnection40)
    at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
    at com.foo.myapp.dataaccess.sql.SkuSql.<init>(SkuSql.java:539)
    at com.foo.myapp.dataaccess.sql.TransactionEntrySql.<init>(TransactionEntrySql.java:143)
    at com.foo.myapp.dataaccess.sql.SqlServer.<init>(SqlServer.java:137)
    at com.foo.myapp.dataaccess.socket.ServerThread.run(ServerThread.java:154)

   Locked ownable synchronizers:
    - None

"ServerThread" prio=6 tid=0x0438a800 nid=0xccc waiting for monitor entry [0x0819e000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at com.sun.deploy.security.CPCallbackHandler$ParentCallback.check(Unknown Source)
    - waiting to lock <0x1d485f80> (a com.sun.deploy.security.CPCallbackHandler$ParentCallback)
    at com.sun.deploy.security.CPCallbackHandler$ParentCallback.access$1400(Unknown Source)
    <SNIP>
    at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
    - locked <0x1b043cb0> (a org.apache.derby.impl.jdbc.EmbedConnection40)
    at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
    at com.foo.myapp.dataaccess.sql.HierarchyGroupSql.<init>(HierarchyGroupSql.java:53)
    at com.foo.myapp.dataaccess.sql.SqlServer.<init>(SqlServer.java:144)
    at com.foo.myapp.dataaccess.socket.ServerThread.run(ServerThread.java:154)

   Locked ownable synchronizers:
    - None

"ServerThread" prio=6 tid=0x04324c00 nid=0x214 waiting for monitor entry [0x0814e000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at com.sun.deploy.security.CPCallbackHandler$ParentCallback.check(Unknown Source)
    - waiting to lock <0x1d485f80> (a com.sun.deploy.security.CPCallbackHandler$ParentCallback)
    at com.sun.deploy.security.CPCallbackHandler$ParentCallback.access$1400(Unknown Source)
    <SNIP>
    at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
    - locked <0x1bc4c8b8> (a org.apache.derby.impl.jdbc.EmbedConnection40)
    at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
    at com.foo.myapp.dataaccess.sql.SkuSql.updateProductDescriptors(SkuSql.java:1050)
    at com.foo.myapp.dataaccess.sql.SkuSql.run(SkuSql.java:918)
    at com.foo.myapp.dataaccess.sql.SqlServerBase.exec(SqlServerBase.java:68)
    at com.foo.myapp.dataaccess.socket.ServerThread.processTransaction(ServerThread.java:215)
    at com.foo.myapp.dataaccess.socket.ServerThread.run(ServerThread.java:161)

   Locked ownable synchronizers:
    - None

"Timer-1232" prio=6 tid=0x042e5400 nid=0xcbc in Object.wait() [0x080ff000]
   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.util.TimerThread.mainLoop(Unknown Source)
    - locked <0x1b849c78> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

"Timer-1225" prio=6 tid=0x04227800 nid=0xcc in Object.wait() [0x0800f000]
   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.util.TimerThread.mainLoop(Unknown Source)
    - locked <0x1b5147f8> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

"Timer-1200" prio=6 tid=0x041bec00 nid=0x9cc in Object.wait() [0x080af000]
   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.util.TimerThread.mainLoop(Unknown Source)
    - locked <0x1a977a20> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Unknown Source)

   Locked ownable synchronizers:
    - None


[SNIPPED about 70 Timer tasks]


"AWT-EventQueue-1" prio=6 tid=0x0420c800 nid=0xdb4 in Object.wait() [0x0729f000]
   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(Unknown Source)
    - locked <0x1d492480> (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.SequencedEvent.dispatch(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.pumpEventsForFilter(Unknown Source)
    at java.awt.Dialog$1.run(Unknown Source)
    at java.awt.Dialog$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Dialog.show(Unknown Source)
    at java.awt.Component.show(Unknown Source)
    at java.awt.Component.setVisible(Unknown Source)
    at java.awt.Window.setVisible(Unknown Source)
    at java.awt.Dialog.setVisible(Unknown Source)
    at com.sun.deploy.ui.DialogTemplate$12.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(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)

   Locked ownable synchronizers:
    - None

"SwingWorker-pool-1-thread-1" daemon prio=6 tid=0x03d23400 nid=0xf18 waiting on condition [0x031bf000]
   java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x22294b78> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.park(Unknown Source)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
    at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

"Thread-24" prio=6 tid=0x03f1cc00 nid=0xe20 runnable [0x0565f000]
   java.lang.Thread.State: RUNNABLE
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(Unknown Source)
    - locked <0x1fc03898> (a java.net.SocksSocketImpl)
    at java.net.ServerSocket.implAccept(Unknown Source)
    at java.net.ServerSocket.accept(Unknown Source)
    at com.foo.myapp.ApplicationRunner$6.run(ApplicationRunner.java:962)
    at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

"Thread-20" prio=6 tid=0x03f2c800 nid=0xba8 waiting on condition [0x0551f000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
    at java.lang.Thread.sleep(Native Method)
    at com.foo.myapp.UserActivityMonitor.run(UserActivityMonitor.java:42)

   Locked ownable synchronizers:
    - None


"TimerQueue" daemon prio=6 tid=0x02d34400 nid=0x9d8 in Object.wait() [0x04c8f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at javax.swing.TimerQueue.run(Unknown Source)
    - locked <0x1ea5c8d0> (a javax.swing.TimerQueue)
    at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

"derby.rawStoreDaemon" daemon prio=6 tid=0x03ec8000 nid=0x584 in Object.wait() [0x0525f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at org.apache.derby.impl.services.daemon.BasicDaemon.rest(Unknown Source)
    - locked <0x1da8f898> (a org.apache.derby.impl.services.daemon.BasicDaemon)
    at org.apache.derby.impl.services.daemon.BasicDaemon.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

"Timer-1" daemon prio=6 tid=0x03ec3000 nid=0x2cc in Object.wait() [0x0520f000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1d816590> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:485)
    at java.util.TimerThread.mainLoop(Unknown Source)
    - locked <0x1d816590> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

"derby.antiGC" daemon prio=2 tid=0x03e84000 nid=0xf70 in Object.wait() [0x051bf000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1d804090> (a org.apache.derby.impl.services.monitor.AntiGC)
    at java.lang.Object.wait(Object.java:485)
    at org.apache.derby.impl.services.monitor.AntiGC.run(Unknown Source)
    - locked <0x1d804090> (a org.apache.derby.impl.services.monitor.AntiGC)
    at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

"Timer-0" prio=6 tid=0x03e71800 nid=0x7c in Object.wait() [0x0511f000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1d7e7b08> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:485)
    at java.util.TimerThread.mainLoop(Unknown Source)
    - locked <0x1d7e7b08> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

"AWT-Shutdown" prio=6 tid=0x03f58000 nid=0xad0 in Object.wait() [0x04bdf000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at sun.awt.AWTAutoShutdown.run(Unknown Source)
    - locked <0x1d480cc8> (a java.lang.Object)
    at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

"NativeSwing Receiver - Swing" daemon prio=6 tid=0x03ed7400 nid=0x80c runnable [0x03dff000]
   java.lang.Thread.State: RUNNABLE
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    - locked <0x1d840e50> (a java.io.BufferedInputStream)
    at java.io.ObjectInputStream$PeekInputStream.peek(Unknown Source)
    at java.io.ObjectInputStream$BlockDataInputStream.peek(Unknown Source)
    at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readUnshared(Unknown Source)
    at chrriis.dj.nativeswing.swtimpl.OutProcessMessagingInterface.readMessageFromChannel(OutProcessMessagingInterface.java:113)
    at chrriis.dj.nativeswing.swtimpl.MessagingInterface$2.run(MessagingInterface.java:329)

   Locked ownable synchronizers:
    - None

"NativeSwing Stream Connector" daemon prio=6 tid=0x03ca6800 nid=0xf30 runnable [0x03daf000]
   java.lang.Thread.State: RUNNABLE
    at java.io.FileInputStream.readBytes(Native Method)
    at java.io.FileInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    - locked <0x1d83c338> (a java.io.BufferedInputStream)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    - locked <0x1d83c358> (a java.io.BufferedInputStream)
    at java.io.FilterInputStream.read(Unknown Source)
    at chrriis.dj.nativeswing.swtimpl.NativeInterface$OutProcess$1.run(NativeInterface.java:696)

   Locked ownable synchronizers:
    - None

"NativeSwing Stream Connector" daemon prio=6 tid=0x03ca6400 nid=0xdf4 runnable [0x0382f000]
   java.lang.Thread.State: RUNNABLE
    at java.io.FileInputStream.readBytes(Native Method)
    at java.io.FileInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    - locked <0x1d83e840> (a java.io.BufferedInputStream)
    at java.io.FilterInputStream.read(Unknown Source)
    at chrriis.dj.nativeswing.swtimpl.NativeInterface$OutProcess$1.run(NativeInterface.java:696)

   Locked ownable synchronizers:
    - None

"WebServer" daemon prio=6 tid=0x03caa800 nid=0x464 runnable [0x037cf000]
   java.lang.Thread.State: RUNNABLE
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(Unknown Source)
    - locked <0x1d83ed08> (a java.net.SocksSocketImpl)
    at java.net.ServerSocket.implAccept(Unknown Source)
    at java.net.ServerSocket.accept(Unknown Source)
    at chrriis.common.WebServer$1.run(WebServer.java:719)

   Locked ownable synchronizers:
    - None

"TimerQueue" daemon prio=6 tid=0x036c3800 nid=0x304 in Object.wait() [0x038ef000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1d430658> (a javax.swing.TimerQueue)
    at javax.swing.TimerQueue.run(Unknown Source)
    - locked <0x1d430658> (a javax.swing.TimerQueue)
    at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

"CacheCleanUpThread" daemon prio=6 tid=0x02dd3000 nid=0xa0 in Object.wait() [0x034af000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1d430698> (a com.sun.deploy.cache.CleanupThread)
    at java.lang.Object.wait(Object.java:485)
    at com.sun.deploy.cache.CleanupThread.run(Unknown Source)
    - locked <0x1d430698> (a com.sun.deploy.cache.CleanupThread)

   Locked ownable synchronizers:
    - None

"CacheMemoryCleanUpThread" daemon prio=6 tid=0x02dd1800 nid=0x14c in Object.wait() [0x0345f000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    - locked <0x1d430790> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    at com.sun.deploy.cache.MemoryCache$LoadedResourceCleanupThread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

"DestroyJavaVM" prio=6 tid=0x003a8800 nid=0xc00 waiting on condition [0x00000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
    - None

"Javaws Secure Thread" daemon prio=6 tid=0x02dca400 nid=0x750 in Object.wait() [0x033bf000]
   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.invokeAndWait(Unknown Source)
    - locked <0x32961e48> (a java.awt.EventQueue$1AWTInvocationLock)
    at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
    at com.sun.deploy.ui.DialogTemplate.setVisible(Unknown Source)
    at com.sun.deploy.ui.UIFactory$8.execute(Unknown Source)
    at com.sun.javaws.ui.JavawsSysRun$SecureThread.doWork(Unknown Source)
    at com.sun.javaws.ui.JavawsSysRun$SecureThread.run(Unknown Source)
    - locked <0x1d430890> (a java.lang.Object)

   Locked ownable synchronizers:
    - None

"AWT-Windows" daemon prio=6 tid=0x02dc8c00 nid=0xa28 runnable [0x00a0f000]
   java.lang.Thread.State: RUNNABLE
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(Unknown Source)

   Locked ownable synchronizers:
    - None

"Java2D Disposer" daemon prio=10 tid=0x02dc6800 nid=0xad4 in Object.wait() [0x032cf000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    - locked <0x1d430968> (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)

   Locked ownable synchronizers:
    - None

"traceMsgQueueThread" daemon prio=6 tid=0x02d3ec00 nid=0xf74 in Object.wait() [0x0322f000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at com.sun.deploy.util.Trace$TraceMsgQueueChecker.run(Unknown Source)
    - locked <0x1d4309f8> (a java.util.ArrayList)
    at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

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

   Locked ownable synchronizers:
    - None

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

   Locked ownable synchronizers:
    - None

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

   Locked ownable synchronizers:
    - None

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

   Locked ownable synchronizers:
    - None

"Finalizer" daemon prio=8 tid=0x02cfec00 nid=0x290 in Object.wait() [0x02ecf000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    - locked <0x1d430c20> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

"Reference Handler" daemon prio=10 tid=0x02cfd400 nid=0x3a4 in Object.wait() [0x02e7f000]
   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.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
    - locked <0x1d4304a8> (a java.lang.ref.Reference$Lock)

   Locked ownable synchronizers:
    - None

"VM Thread" prio=10 tid=0x02cfc000 nid=0xc30 runnable 

"VM Periodic Task Thread" prio=10 tid=0x02d1a000 nid=0x840 waiting on condition 

JNI global references: 2314
+1  A: 

You've probably run into bug 6960427, which was reported against 1.6.0_20 (dead lock issue).

Are you sure that the posted stack trace is complete? You have several threads waiting to lock on 0x1d485f80, but no thread with an actual lock on that monitor.

jarnbjo
It's appears to be a different lock that's causing the problem, but related.
Tom Hawtin - tackline
Hi, apologies for the delay in replying, I've just got to read the responses now. With regard to the lock on 0x1d485f80, I snipped this alright, it is being held by thread 0x05913400. It looks as follows: - locked <0x1d485f80> (a com.sun.deploy.security.CPCallbackHandler$ParentCallback)
PhilDin
[Please ignore the above comment, here's the intended one] Hi, apologies for the delay in replying, I've just got to read the responses now. With regard to the lock on 0x1d485f80, I snipped this alright, it is being held by thread 0x05913400. It looks as follows: - locked <0x1d485f80> (a com.sun.deploy.security.CPCallbackHandler$ParentCallback) Am I right in interpretting this to mean that the type of object being locked is a ParentCallback? It does look similar to bug 6960427 but I notice that in the bug report, it lists one deadlock at the end, my jstack output doesn't identify any.
PhilDin
+1  A: 

There's a lot of thread claiming

- waiting to lock <0x1d485f80> (a com.sun.deploy.security.CPCallbackHandler$ParentCallback)

Is that held somewhere in the snipped output?

It seems like you are intentionally mixing trusted and untrusted code ("mixed code"), which is a Bad Thing. From 6u19 a warning dialog is shown (really the attempt should be automatically blocked, but there appears to be plenty of code out there exploiting the bug). It's this warning dialog that appears to be causing the problem.

To fix, don't mix trusted and untrusted code. It's a good idea to add "Trusted-Only: true" to the manifest of each jar.

Tom Hawtin - tackline
Hi Tom, I have had problems with trusted/untrusted code warnings but this is not intentional. I have signed all jars (my own + third party) with a self signed cert so I wasn't expecting this to be a problem. May I ask how you are able to tell this from the stack output (is it the "16.3-b01 mixed mode, sharing" line at the top?) Secondly, how can you tell from the output that the warning dialog is the problem? Thanks.
PhilDin
The stack traces include the likes of `showMixedTrustDialog` and other threads appear to be blocking in deployment code whilst loading classes. "16.3-b01 mixed mode, sharing" refers to the version of HotSpot (now decoupled from the JRE version), the fact that it is using both the bytecode compiler and interpreter, and sharing is "Class Data Sharing" which is the use of the `classes.jsa` file that gives faster start up performance. As I say, if you add `Trusted-Only: true` to your manifests, then that should silently prevent loading untrusted code whether unintentionally of from and adversary.
Tom Hawtin - tackline