[This reply is migrated from our old forums. The original author name has been removed]
Re: app periodically stalls after executing sql for about a minute....
Just happened again. Mem usage was 147M / 918M .. I was able to capture jstack output while this was transpiring:
C:\Program Files (x86)\Java\jdk1.7.0_21\bin>jps
30492 dbvis.exe
24064 studio.jar
18932 Jps
C:\Program Files (x86)\Java\jdk1.7.0_21\bin>jstack 30492
2014-04-30 08:42:46
Full thread dump Java HotSpot(TM) Client VM (24.51-b03 mixed mode):
"pool-3-thread-5" prio=6 tid=0x03106c00 nid=0x7728 waiting on condition [0x5025f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x1b6f6d70> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(Unknown Source)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(Unknown Source)
at java.util.concurrent.SynchronousQueue.poll(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
"ExecutorRunner-pool-2-thread-5" daemon prio=6 tid=0x03106400 nid=0x5928 in Object.wait() [0x501cf000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at java.awt.EventQueue.invokeAndWait(Unknown Source)
- locked <0x08f7c190> (a java.awt.EventQueue$1AWTInvocationLock)
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
at com.onseven.dbvis.k.A.B.?(Z:3018)
at com.onseven.dbvis.R.F.?(Z:2022)
at com.onseven.dbvis.U.J$D.?(Z:238)
at com.onseven.dbvis.J.B.C.?(Z:1956)
at com.onseven.dbvis.J.B.C.?(Z:2351)
at com.onseven.dbvis.J.B.C.?(Z:1494)
at com.onseven.dbvis.J.B.C.?(Z:43)
at com.onseven.dbvis.J.B.C.execute(Z:2561)
at com.onseven.dbvis.J.B.Y.?(Z:1386)
at com.onseven.dbvis.J.B.K.?(Z:1374)
at com.onseven.dbvis.J.B.K.doInBackground(Z:1521)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
"pool-3-thread-4" prio=6 tid=0x03107400 nid=0x5fc0 waiting on condition [0x5013f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x1b6f6d70> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(Unknown Source)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(Unknown Source)
at java.util.concurrent.SynchronousQueue.poll(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
"Image Animator 3" daemon prio=4 tid=0x03104000 nid=0x4a30 waiting on condition [0x500af000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at sun.awt.image.GifFrame.dispose(Unknown Source)
at sun.awt.image.GifImageDecoder.readImage(Unknown Source)
at sun.awt.image.GifImageDecoder.produceImage(Unknown Source)
at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
at sun.awt.image.ImageFetcher.run(Unknown Source)
"DbVisAutoSaver" prio=6 tid=0x03106000 nid=0x70a8 in Object.wait() [0x5588f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.util.TimerThread.mainLoop(Unknown Source)
- locked <0x1b1dd698> (a java.util.TaskQueue)
at java.util.TimerThread.run(Unknown Source)
"Timer-1" daemon prio=6 tid=0x03105800 nid=0x61c4 in Object.wait() [0x0226f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x1b1dd740> (a java.util.TaskQueue)
at java.util.TimerThread.mainLoop(Unknown Source)
- locked <0x1b1dd740> (a java.util.TaskQueue)
at java.util.TimerThread.run(Unknown Source)
"D3D Screen Updater" daemon prio=8 tid=0x03105400 nid=0x7494 in Object.wait() [0x557ff000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at sun.java2d.d3d.D3DScreenUpdateManager.run(Unknown Source)
- locked <0x1b1dd7e8> (a java.lang.Object)
at java.lang.Thread.run(Unknown Source)
"DbVisEventQueue" daemon prio=6 tid=0x03104c00 nid=0x6164 in Object.wait() [0x5576f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.util.TimerThread.mainLoop(Unknown Source)
- locked <0x19f09fe0> (a java.util.TaskQueue)
at java.util.TimerThread.run(Unknown Source)
"Timer-0" prio=6 tid=0x03104800 nid=0x3358 in Object.wait() [0x5560f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x19cc9db0> (a java.util.TaskQueue)
at java.lang.Object.wait(Object.java:503)
at java.util.TimerThread.mainLoop(Unknown Source)
- locked <0x19cc9db0> (a java.util.TaskQueue)
at java.util.TimerThread.run(Unknown Source)
"Swing-Shell" daemon prio=6 tid=0x4f87c400 nid=0x4ec4 waiting on condition [0x548df000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x19bd06d8> (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.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
"TimerQueue" daemon prio=6 tid=0x4f757000 nid=0x7440 waiting on condition [0x5484f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x19bf5588> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
at java.util.concurrent.DelayQueue.take(Unknown Source)
at javax.swing.TimerQueue.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
"SyntheticaCleanerThread" daemon prio=6 tid=0x4f634800 nid=0x265c waiting on condition [0x5472f000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at de.javasoft.plaf.synthetica.StyleFactory$ComponentPropertyStore$1.run(StyleFactory.java:1804)
"AWT-EventQueue-0" prio=6 tid=0x030f7800 nid=0x742c runnable [0x4f28e000]
java.lang.Thread.State: RUNNABLE
at com.jidesoft.grid.DefaultTableModelWrapper.getVisualRowAt(Unknown Source)
- locked <0x201b9600> (a com.onseven.dbvis.J.A.G)
at com.jidesoft.grid.SortableTableModel.getSortedRowAt(Unknown Source)
at com.jidesoft.grid.SortableTableModel.a(Unknown Source)
at com.jidesoft.grid.SortableTableModel.tableChanged(Unknown Source)
at javax.swing.table.AbstractTableModel.fireTableChanged(Unknown Source)
at com.onseven.dbvis.J.A.B.?(Z:2093)
at com.onseven.dbvis.J.A.B.fireTableRowsUpdated(Z:1623)
at com.onseven.dbvis.l.F.?(Z:2267)
at com.onseven.dbvis.l.s.?(Z:3251)
at com.onseven.dbvis.l.s.?(Z:991)
at com.onseven.dbvis.R.A.A.D.reset(Z:2335)
at com.onseven.dbvis.R.C.?(Z:1495)
at com.onseven.dbvis.k.B.B.dispose(Z:2118)
at com.onseven.dbvis.R.F$1$1.dispose(Z:2388)
at com.onseven.dbvis.k.A$1.dockableFrameRemoved(Z:2420)
at com.jidesoft.docking.DockableFrame.fireDockableFrameEvent(Unknown Source)
at com.jidesoft.docking.DefaultDockingManager.a(Unknown Source)
at com.jidesoft.docking.DefaultDockingManager.removeFrame(Unknown Source)
at com.jidesoft.docking.DefaultDockingManager.removeFrame(Unknown Source)
at com.onseven.dbvis.k.A.?(Z:146)
at com.onseven.dbvis.k.A.?(Z:2158)
at com.onseven.dbvis.k.H.?(Z:1244)
at com.onseven.dbvis.k.H.?(Z:49)
at com.onseven.dbvis.U.J$2.run(Z:1640)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at com.onseven.dbvis.N.A._.dispatchEvent(Z:2787)
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)
"AWT-Windows" daemon prio=6 tid=0x030f7000 nid=0x41f8 runnable [0x4f1ff000]
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=0x030f6800 nid=0x76d4 in Object.wait() [0x4f16f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at sun.awt.AWTAutoShutdown.run(Unknown Source)
- locked <0x194edd78> (a java.lang.Object)
at java.lang.Thread.run(Unknown Source)
"Java2D Disposer" daemon prio=10 tid=0x030f6400 nid=0x5098 in Object.wait() [0x4f0df000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
- locked <0x194ede08> (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)
"Exe4JStartupThread" daemon prio=6 tid=0x0313dc00 nid=0x7428 waiting on condition [0x4ef8f000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at com.exe4j.Controller$StartupThread.run(Unknown Source)
"Service Thread" daemon prio=6 tid=0x02d67000 nid=0x7bd8 runnable [0x00000000]
java.lang.Thread.State: RUNNABLE
"C1 CompilerThread0" daemon prio=10 tid=0x02d62000 nid=0x7568 waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
"Attach Listener" daemon prio=10 tid=0x02d60400 nid=0x3d20 waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=10 tid=0x02d5d000 nid=0x7560 runnable [0x00000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=8 tid=0x02d4fc00 nid=0x7bb4 in Object.wait() [0x4ec2f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
- locked <0x19161d60> (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=0x02d4ac00 nid=0x6a78 in Object.wait() [0x4eb9f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
- locked <0x19161de8> (a java.lang.ref.Reference$Lock)
"main" prio=6 tid=0x02b6a400 nid=0x73a4 waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
"VM Thread" prio=10 tid=0x02d48800 nid=0x5a80 runnable
"VM Periodic Task Thread" prio=10 tid=0x02d69800 nid=0x76e4 waiting on condition
JNI global references: 1944
C:\Program Files (x86)\Java\jdk1.7.0_21\bin>
Hans Bergsten
said
over 10 years ago
[This reply is migrated from our old forums.]
Re: app periodically stalls after executing sql for about a minute....
Hi Alex,
Thanks for all the extra info and traces.
First, I forgot to mention that the extra JVM flags I asked you to add only produce the messages I was interested in if you start DbVisualizer with the script; the launcher writes the message to the system console so you do not see them. But given that your memory usage was low when it happened, combined with what the jstack output shows, it's pretty clear that the freeze is not caused by Full GCs so you can remove the flags again. As you have noticed, using them slows down the processing a bit in general.
The jstack output shows that the activity of interest when this happens is rendering of the result set, and the background thread that produced the result set is waiting while this is happening, explaining both the GUI freeze and the time gap in the debug output.
It is odd that it should take such a long time to render the result with roughly 600 rows/15 columns sometimes, but there's not a whole lot I can suggest to improve it. You can try to disable Auto Resize. If you have many other applications running when this happens, closing them may help. If most of the memory on the PC is used, adding more memory may help. I don't know about Windows 7, but some OSes slow down when the hard disk is more than 90% full. Other than that, you can try upgrading Java to the latest Java 7 version (it looks like you've been using Java 6 for DbVisualizer).
I hope this helps.
Best Regards,
Hans
anonymous