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

Deadlock between subclass of AbstractDocument and UndoManager

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b36
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      The bug is reproducible on jdk8 with the following stacktrace (the test is attached):

      "Thread 1@382" prio=5 tid=0x17 nid=NA waiting for monitor entry
        java.lang.Thread.State: BLOCKED
      waiting for Thread 2@383 to release lock on <0x18c> (a javax.swing.undo.UndoManager)
      at javax.swing.undo.UndoManager.addEdit(UndoManager.java:502)
      at javax.swing.undo.UndoManager.undoableEditHappened(UndoManager.java:611)
      at javax.swing.text.AbstractDocument.fireUndoableEditUpdate(AbstractDocument.java:287)
      at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:754)
      at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:708)
      at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
      at UndoManagerDeadlockTest$1.run(UndoManagerDeadlockTest.java:28)

      "Thread 2@383" prio=5 tid=0x18 nid=NA waiting
        java.lang.Thread.State: WAITING
      blocks Thread 1@382
      at java.lang.Object.wait(Object.java:-1)
      at java.lang.Object.wait(Object.java:502)
      at javax.swing.text.AbstractDocument.writeLock(AbstractDocument.java:1344)
      at javax.swing.text.AbstractDocument$DefaultDocumentEvent.undo(AbstractDocument.java:2799)
      at javax.swing.undo.UndoManager.undoTo(UndoManager.java:335)
      at javax.swing.undo.UndoManager.undo(UndoManager.java:413)
      - locked <0x18c> (a javax.swing.undo.UndoManager)
      at UndoManagerDeadlockTest$2.run(UndoManagerDeadlockTest.java:39)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rupashka Pavel Porvatov (Inactive)
              Reporter:
              rupashka Pavel Porvatov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: