Skip to content

Opening data through the Micro-Magellan plugin leads to a deadlock on newer JREs #10

@nicost

Description

@nicost

The following was seen while running Micro-Manager under IntelliJ (which I presume to be irrelevant). When using AdoptOpenJDP 1.8.242, the deadlock described below hangs the application. This deadlock does not occurr with jre 1.8.131 or 1.8.152 (which ships with Micro-Manager). I would assume that some change in Swing in between 1.8.152 and 1.8.242 does not play well with NDViewer. This will need to fixed at some point, as Micro-Manager will likely start using a newer jre.

Description: Open a dataset acquired in Micro-Magellan. Select "Open Dataset" and select the dataset. Many progress bars show up and disappear. The Magellan viewer window shows with a black pane on the left, and no histograms on the right. There appears to be a dead lock, as the UI no longer responds (have to kill Micro-Manager).

Following is produced by the EDT monitor in MM:

2020-09-22T20:01:04.276648 tid29668 [IFO,App] EDTHangLogger: Missed heartbeat; waiting to see if we are stuck on a single event
2020-09-22T20:01:05.285201 tid29668 [IFO,App] EDTHangLogger: Event handling has exceeded at least 1006 ms (currently 5508 ms since heartbeat timebase)
[ ] Stack traces follow (note: thread states queried later than stack traces)
[ ] Thread 2 [Reference Handler] WAITING
[ ] at java.lang.Object.wait(Native Method)
[ ] at java.lang.Object.wait(Object.java:502)
[ ] at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
[ ] at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)
[ ] Thread 3 [Finalizer] WAITING
[ ] at java.lang.Object.wait(Native Method)
[ ] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
[ ] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165)
[ ] at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:216)
[ ] Thread 4 [Signal Dispatcher] RUNNABLE
[ ] Thread 5 [Attach Listener] RUNNABLE
[ ] Thread 15 [RMI TCP Accept-0] RUNNABLE
[ ] at java.net.DualStackPlainSocketImpl.accept0(Native Method)
[ ] at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:131)
[ ] at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
[ ] at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
[ ] at java.net.ServerSocket.implAccept(ServerSocket.java:560)
[ ] at java.net.ServerSocket.accept(ServerSocket.java:528)
[ ] at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:405)
[ ] at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:377)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 16 [RMI Reaper] WAITING
[ ] at java.lang.Object.wait(Native Method)
[ ] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
[ ] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165)
[ ] at sun.rmi.transport.ObjectTable$Reaper.run(ObjectTable.java:351)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 17 [GC Daemon] TIMED_WAITING
[ ] at java.lang.Object.wait(Native Method)
[ ] at sun.misc.GC$Daemon.run(GC.java:117)
[ ] Thread 18 [Java2D Disposer] WAITING
[ ] at java.lang.Object.wait(Native Method)
[ ] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
[ ] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165)
[ ] at sun.java2d.Disposer.run(Disposer.java:148)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 19 [AWT-Shutdown] WAITING
[ ] at java.lang.Object.wait(Native Method)
[ ] at java.lang.Object.wait(Object.java:502)
[ ] at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:295)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 20 [AWT-Windows] RUNNABLE
[ ] at sun.awt.windows.WToolkit.eventLoop(Native Method)
[ ] at sun.awt.windows.WToolkit.run(WToolkit.java:316)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 22 [AWT-EventQueue-0] RUNNABLE
[ ] at sun.java2d.pisces.Renderer.lineTo(Renderer.java:382)
[ ] at sun.java2d.pisces.Stroker$PolyStack.pop(Stroker.java:1194)
[ ] at sun.java2d.pisces.Stroker.emitReverse(Stroker.java:415)
[ ] at sun.java2d.pisces.Stroker.finish(Stroker.java:438)
[ ] at sun.java2d.pisces.Stroker.moveTo(Stroker.java:348)
[ ] at sun.java2d.pisces.Dasher.goTo(Dasher.java:155)
[ ] at sun.java2d.pisces.Dasher.lineTo(Dasher.java:210)
[ ] at sun.java2d.pipe.RenderingEngine.feedConsumer(RenderingEngine.java:366)
[ ] at sun.java2d.pisces.PiscesRenderingEngine.pathTo(PiscesRenderingEngine.java:484)
[ ] at sun.java2d.pisces.PiscesRenderingEngine.strokeTo(PiscesRenderingEngine.java:363)
[ ] at sun.java2d.pisces.PiscesRenderingEngine.strokeTo(PiscesRenderingEngine.java:163)
[ ] at sun.java2d.pisces.PiscesRenderingEngine.getAATileGenerator(PiscesRenderingEngine.java:562)
[ ] at sun.java2d.pipe.AAShapePipe.renderPath(AAShapePipe.java:152)
[ ] at sun.java2d.pipe.AAShapePipe.draw(AAShapePipe.java:64)
[ ] at sun.java2d.pipe.PixelToParallelogramConverter.draw(PixelToParallelogramConverter.java:148)
[ ] at sun.java2d.SunGraphics2D.draw(SunGraphics2D.java:2497)
[ ] at org.micromanager.ndviewer.internal.gui.contrast.HistogramPanel.drawCursor(HistogramPanel.java:159)
[ ] at org.micromanager.ndviewer.internal.gui.contrast.HistogramPanel.paintComponent(HistogramPanel.java:715)
[ ] at javax.swing.JComponent.paint(JComponent.java:1056)
[ ] at org.micromanager.ndviewer.internal.gui.contrast.ChannelControlPanel$5.paint(ChannelControlPanel.java:277)
[ ] at javax.swing.JComponent.paintChildren(JComponent.java:889)
[ ] at javax.swing.JComponent.paint(JComponent.java:1065)
[ ] at javax.swing.JComponent.paintChildren(JComponent.java:889)
[ ] at javax.swing.JComponent.paint(JComponent.java:1065)
[ ] at javax.swing.JComponent.paintChildren(JComponent.java:889)
[ ] at javax.swing.JComponent.paint(JComponent.java:1065)
[ ] at javax.swing.JComponent.paintChildren(JComponent.java:889)
[ ] at javax.swing.JComponent.paint(JComponent.java:1065)
[ ] at javax.swing.JViewport.paint(JViewport.java:728)
[ ] at javax.swing.JComponent.paintChildren(JComponent.java:889)
[ ] at javax.swing.JComponent.paint(JComponent.java:1065)
[ ] at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
[ ] at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
[ ] at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
[ ] at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
[ ] at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
[ ] at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
[ ] at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
[ ] at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
[ ] at java.security.AccessController.doPrivileged(Native Method)
[ ] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
[ ] at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
[ ] at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
[ ] at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
[ ] at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
[ ] at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
[ ] at java.awt.event.InvocationEvent.dispatch$$$capture(InvocationEvent.java:311)
[ ] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java)
[ ] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
[ ] at java.awt.EventQueue.access$500(EventQueue.java:97)
[ ] at java.awt.EventQueue$3.run(EventQueue.java:709)
[ ] at java.awt.EventQueue$3.run(EventQueue.java:703)
[ ] at java.security.AccessController.doPrivileged(Native Method)
[ ] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
[ ] at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
[ ] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
[ ] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
[ ] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
[ ] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
[ ] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
[ ] at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
[ ] Thread 25 [DestroyJavaVM] RUNNABLE
[ ] Thread 26 [User Profile Saver Pool Thread 0] WAITING
[ ] at sun.misc.Unsafe.park(Native Method)
[ ] at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
[ ] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
[ ] at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1081)
[ ] at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
[ ] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
[ ] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
[ ] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 29 [TimerQueue] TIMED_WAITING
[ ] at sun.misc.Unsafe.park(Native Method)
[ ] at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
[ ] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
[ ] at java.util.concurrent.DelayQueue.take(DelayQueue.java:223)
[ ] at javax.swing.TimerQueue.run(TimerQueue.java:174)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 30 [EDTHangLogger timer] RUNNABLE
[ ] at java.lang.Thread.dumpThreads(Native Method)
[ ] at java.lang.Thread.getAllStackTraces(Thread.java:1610)
[ ] at org.micromanager.internal.diagnostics.EDTHangLogger.checkForHang(EDTHangLogger.java:233)
[ ] at org.micromanager.internal.diagnostics.EDTHangLogger.access$200(EDTHangLogger.java:34)
[ ] at org.micromanager.internal.diagnostics.EDTHangLogger$4.run(EDTHangLogger.java:220)
[ ] at java.util.TimerThread.mainLoop(Timer.java:555)
[ ] at java.util.TimerThread.run(Timer.java:505)
[ ] Thread 31 [Thread-4] TIMED_WAITING
[ ] at java.lang.Object.wait(Native Method)
[ ] at bsh.util.JConsole$BlockingPipedInputStream.read(JConsole.java:771)
[ ] at java.io.PipedInputStream.read(PipedInputStream.java:377)
[ ] at java.io.InputStream.read(InputStream.java:101)
[ ] at bsh.util.JConsole.inPipeWatcher(JConsole.java:667)
[ ] at bsh.util.JConsole.run(JConsole.java:677)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 32 [BeanShell interpreter] TIMED_WAITING
[ ] at java.lang.Object.wait(Native Method)
[ ] at java.io.PipedInputStream.read(PipedInputStream.java:326)
[ ] at java.io.PipedInputStream.read(PipedInputStream.java:377)
[ ] at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
[ ] at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
[ ] at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
[ ] at java.io.InputStreamReader.read(InputStreamReader.java:184)
[ ] at bsh.JavaCharStream.FillBuff(JavaCharStream.java:160)
[ ] at bsh.JavaCharStream.ReadByte(JavaCharStream.java:188)
[ ] at bsh.JavaCharStream.readChar(JavaCharStream.java:289)
[ ] at bsh.JavaCharStream.BeginToken(JavaCharStream.java:209)
[ ] at bsh.ParserTokenManager.getNextToken(ParserTokenManager.java:2072)
[ ] at bsh.Parser.jj_ntk(Parser.java:6022)
[ ] at bsh.Parser.Line(Parser.java:163)
[ ] at bsh.Interpreter.Line(Interpreter.java:1011)
[ ] at bsh.Interpreter.run(Interpreter.java:462)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 36 [Thread-8] RUNNABLE
[ ] at java.net.DualStackPlainSocketImpl.accept0(Native Method)
[ ] at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:131)
[ ] at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
[ ] at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
[ ] at java.net.ServerSocket.implAccept(ServerSocket.java:560)
[ ] at java.net.ServerSocket.accept(ServerSocket.java:528)
[ ] at bsh.util.Httpd.run(Httpd.java:64)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 38 [Thread-10] RUNNABLE
[ ] at java.net.DualStackPlainSocketImpl.accept0(Native Method)
[ ] at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:131)
[ ] at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
[ ] at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
[ ] at java.net.ServerSocket.implAccept(ServerSocket.java:560)
[ ] at java.net.ServerSocket.accept(ServerSocket.java:528)
[ ] at bsh.util.Sessiond.run(Sessiond.java:65)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 39 [ZMQ Server ] RUNNABLE
[ ] at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
[ ] at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:296)
[ ] at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:278)
[ ] at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159)
[ ] at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
[ ] at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
[ ] at zmq.Signaler.waitEvent(Signaler.java:129)
[ ] at zmq.Mailbox.recv(Mailbox.java:90)
[ ] at zmq.SocketBase.processCommands(SocketBase.java:911)
[ ] at zmq.SocketBase.recv(SocketBase.java:834)
[ ] at org.zeromq.ZMQ$Socket.recv(ZMQ.java:3358)
[ ] at org.zeromq.ZMQ$Socket.recvStr(ZMQ.java:3450)
[ ] at org.zeromq.ZMQ$Socket.recvStr(ZMQ.java:3431)
[ ] at org.micromanager.internal.zmq.ZMQServer.lambda$initialize$1(ZMQServer.java:94)
[ ] at org.micromanager.internal.zmq.ZMQServer$$Lambda$120/693215675.call(Unknown Source)
[ ] at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
[ ] at java.util.concurrent.FutureTask.run(FutureTask.java)
[ ] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[ ] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 40 [reaper-1] RUNNABLE
[ ] at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
[ ] at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:296)
[ ] at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:278)
[ ] at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159)
[ ] at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
[ ] at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
[ ] at zmq.poll.Poller.run(Poller.java:234)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 41 [iothread-2] RUNNABLE
[ ] at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
[ ] at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:296)
[ ] at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:278)
[ ] at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159)
[ ] at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
[ ] at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
[ ] at zmq.poll.Poller.run(Poller.java:234)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 44 [Swing-Shell] WAITING
[ ] at sun.misc.Unsafe.park(Native Method)
[ ] at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
[ ] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
[ ] at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
[ ] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
[ ] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
[ ] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[ ] at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Win32ShellFolderManager2.java:586)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 70 [Display calculation executor] WAITING
[ ] at sun.misc.Unsafe.park(Native Method)
[ ] at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
[ ] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
[ ] at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
[ ] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
[ ] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
[ ] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[ ] at java.lang.Thread.run(Thread.java:748)
[ ] Thread 71 [Overalyer task thread] WAITING
[ ] at sun.misc.Unsafe.park(Native Method)
[ ] at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
[ ] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
[ ] at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
[ ] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
[ ] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
[ ] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[ ] at java.lang.Thread.run(Thread.java:748)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions