Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8260587

IGV: Crash due to double addition of node to block

    XMLWordPrintable

    Details

      Description

      Ideal Graph Visualizer throws the following exception error when drawing a relatively large graph (see screenshot attached):

      java.lang.AssertionError: duplicate : Node 3355 [bci=69 11, debug_idx=14103355, dump_spec=#java/nio/file/Path:NotNull * Interface:java/nio/file/Path:NotNull *, id=3355, idx=3355, line=83, name=CastPP, type=inst:]
      at com.sun.hotspot.igv.data.InputBlock.addNode(InputBlock.java:95)
      at com.sun.hotspot.igv.data.InputGraph.ensureNodesInBlocks(InputGraph.java:173)
      at com.sun.hotspot.igv.view.DiagramScene.update(DiagramScene.java:522)
      at com.sun.hotspot.igv.view.DiagramScene.setNewModel(DiagramScene.java:502)
      at com.sun.hotspot.igv.view.DiagramScene.<init>(DiagramScene.java:442)
      at com.sun.hotspot.igv.view.EditorTopComponent.<init>(EditorTopComponent.java:210)
      at com.sun.hotspot.igv.view.GraphViewerImplementation.view(GraphViewerImplementation.java:60)
      at com.sun.hotspot.igv.coordinator.actions.GraphOpenCookie.open(GraphOpenCookie.java:42)
      at org.openide.actions.OpenAction.performAction(OpenAction.java:84)
      at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:586)
      at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)
      at org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:116)
      at org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:99)
      at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:583)
      at org.openide.explorer.view.TreeView$PopupSupport.mouseClicked(TreeView.java:1625)
      at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:270)
      at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:269)
      at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:269)
      at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:269)
      at java.awt.Component.processMouseEvent(Component.java:6542)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
      at java.awt.Component.processEvent(Component.java:6304)
      at java.awt.Container.processEvent(Container.java:2239)
      at java.awt.Component.dispatchEventImpl(Component.java:4889)
      at java.awt.Container.dispatchEventImpl(Container.java:2297)
      at java.awt.Component.dispatchEvent(Component.java:4711)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4544)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
      at java.awt.Container.dispatchEventImpl(Container.java:2283)
      at java.awt.Window.dispatchEventImpl(Window.java:2746)
      at java.awt.Component.dispatchEvent(Component.java:4711)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
      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.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
      at java.awt.EventQueue$4.run(EventQueue.java:733)
      at java.awt.EventQueue$4.run(EventQueue.java:731)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
      at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
      [catch] 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)

      The assertion error indicates that the same node is being added twice to a basic block when computing the approximated CFG.

      STEPS TO REPRODUCE:

      1. $ cd src/utils/IdealGraphVisualizer
      2. $ export JAVA_HOME=... (JDK 8)
      3. $ ant build
      4. $ sh igv.sh
      5. $ java -Xbatch -XX:CompileCommand=IGVPrintLevel,java.nio.file.FileTreeIterator::fetchNextIfNeeded,1 -XX:CompileCommand=compileonly,java.nio.file.FileTreeIterator::fetchNextIfNeeded HelloWorld.java
      6. Go to IdealGraphVisualizer window, expand the first method "virtual void java.nio.file.FileTreeIterator::fetchNextIfNeeded()"
      7. Double-click on "Before matching"
      8. After a few seconds, the exception is triggered

      The Ideal Graph Visualizer runs on the following JDK version:

      $JAVA_HOME/bin/java -version
      java version "1.8.0_261"
      Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rcastanedalo Roberto Castaneda Lozano
              Reporter:
              rcastanedalo Roberto Castaneda Lozano
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: