Skip to content

ClosedByInterruptException while computing Path to GC Root in Heap Viewer #662

Description

@thurka

VisualVM throws java.nio.channels.ClosedByInterruptException while computing the nearest GC root / path to GC root for an instance in the Heap Viewer.

VisualVM 2.2.1, JDK 17.

  java.nio.channels.ClosedByInterruptException
      at java.base/java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:199)
      at java.base/sun.nio.ch.FileChannelImpl.endBlocking(FileChannelImpl.java:171)
      at java.base/sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:293)
      at org.graalvm.visualvm.lib.jfluid.heap.AbstractLongMap$LongMemoryMappedData.force(AbstractLongMap.java:542)
      at org.graalvm.visualvm.lib.jfluid.heap.AbstractLongMap$AbstractData.writeToStream(AbstractLongMap.java:265)
      at org.graalvm.visualvm.lib.jfluid.heap.AbstractLongMap.writeToStream(AbstractLongMap.java:175)
      at org.graalvm.visualvm.lib.jfluid.heap.LongMap.writeToStream(LongMap.java:310)
      at org.graalvm.visualvm.lib.jfluid.heap.HprofHeap.writeToStream(HprofHeap.java:361)
      at org.graalvm.visualvm.lib.jfluid.heap.HprofHeap.writeToFile(HprofHeap.java:335)
      at org.graalvm.visualvm.lib.jfluid.heap.NearestGCRoot.computeGCRoots(NearestGCRoot.java:128)
      at org.graalvm.visualvm.lib.jfluid.heap.NearestGCRoot.getNearestGCRootPointer(NearestGCRoot.java:87)
      at org.graalvm.visualvm.lib.jfluid.heap.HprofHeap.getNearestGCRootPointer(HprofHeap.java:862)
      at org.graalvm.visualvm.lib.jfluid.heap.InstanceDump.getNearestGCRootPointer(InstanceDump.java:87)
      at org.graalvm.visualvm.heapviewer.java.impl.PathToGCRootPlugin.computeInstanceRoots(PathToGCRootPlugin.java:366)
      at org.graalvm.visualvm.heapviewer.java.impl.PathToGCRootPlugin$1.computeData(PathToGCRootPlugin.java:193)
      at org.graalvm.visualvm.heapviewer.ui.TreeTableView$1.lazilyComputeChildren(TreeTableView.java:147)
      at org.graalvm.visualvm.heapviewer.model.HeapViewerNode$1.doInBackground(HeapViewerNode.java:179)
      at javax.swing.SwingWorker$1.call(SwingWorker.java:304)
      at java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at javax.swing.SwingWorker.run(SwingWorker.java:343)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      at java.lang.Thread.run(Thread.java:842)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions