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

[macosx] Found one Java-level deadlock:"AWT-EventQueue-0" && main

    Details

    • Subcomponent:
    • Resolved In Build:
      b115
    • CPU:
      generic

      Description

      Tested jdk 8 b110:
      lwawt takes a locks in the wrong order, but this particular issue can be fixed in the setFont(), because synchronisation on this is not necessary there.

      Testcase attached:

      Found one Java-level deadlock:
      =============================
      "AWT-EventQueue-0":
        waiting to lock monitor 0x00007fa355092108 (object 0x0000000700241b68, a LabelRepaint),
        which is held by "main"
      "main":
        waiting to lock monitor 0x00007fa354806328 (object 0x0000000700010520, a java.awt.Component$AWTTreeLock),
        which is held by "AWT-EventQueue-0"

      Java stack information for the threads listed above:
      ===================================================
      "AWT-EventQueue-0":
      at java.awt.Component.setFont(Component.java:1888) <<<<<<<<<<<<<<<<<<<<<<<<<<<<NOT NECESSARY???
      - waiting to lock <0x0000000700241b68> (a LabelRepaint)
      - locked <0x0000000700010520> (a java.awt.Component$AWTTreeLock)
      at LabelRepaint.test(LabelRepaint.java:52)
      at LabelRepaint.paint(LabelRepaint.java:36)
      at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
      at sun.lwawt.LWRepaintArea.paintComponent(LWRepaintArea.java:59)
      at sun.awt.RepaintArea.paint(RepaintArea.java:240)
      at sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:1316)
      at sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.ja
      "main":
      at sun.lwawt.LWLabelPeer.setText(LWLabelPeer.java:60)
      - waiting to lock <0x0000000700010520> (a java.awt.Component$AWTTreeLock)
      at java.awt.Label.setText(Label.java:253)
      - locked <0x0000000700241b68> (a LabelRepaint)
      at LabelRepaint.test(LabelRepaint.java:44)
      at LabelRepaint.main(LabelRepaint.java:18)

      Found 1 deadlock.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                serb Sergey Bylokhov
                Reporter:
                serb Sergey Bylokhov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: