-
Bug
-
Resolution: Fixed
-
P3
-
8, 9
-
b70
-
generic
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8135922 | emb-9 | Unassigned | P3 | Resolved | Fixed | team |
JDK-8129149 | 8u65 | Anton Nashatyrev | P3 | Resolved | Fixed | b02 |
JDK-8085812 | 8u60 | Anton Nashatyrev | P3 | Resolved | Fixed | b20 |
JDK-8138234 | emb-8u65 | Unassigned | P3 | Resolved | Fixed | b02 |
JDK-8129673 | emb-8u60 | Anton Nashatyrev | P3 | Resolved | Fixed | b20 |
Our automated tests encountered this. Although it will be difficult to
reproduce, it looks like a simple deadlock between a monitor lock and a
ReentrantLock in the AWT clipboard support.
Deadlock detected:
==================
"System clipboard synchronizer":
waiting to lock sun.awt.X11.XClipboard@59383e0f
which is held by "AWT-EventQueue-0"
"AWT-EventQueue-0":
waiting to lock
java.util.concurrent.locks.ReentrantLock$NonfairSync@2943444d
which is held by "AWT-XAWT"
"AWT-XAWT":
waiting to lock java.lang.Object@7ac3597e
which is held by "AWT-EventQueue-0"
Stacks for threads in question:
"AWT-EventQueue-0" Id=15 WAITING on
java.util.concurrent.locks.ReentrantLock$NonfairSync@2943444d owned by
"AWT-XAWT" Id=12
at sun.misc.Unsafe.park(Native Method)
- waiting on java.util.concurrent.locks.ReentrantLock$NonfairSync@2943444d
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
at sun.awt.SunToolkit.awtLock(SunToolkit.java:253)
at sun.awt.X11.XRootWindow.getInstance(XRootWindow.java:36)
at sun.awt.X11.XBaseWindow.getXAWTRootWindow(XBaseWindow.java:412)
at sun.awt.X11.XClipboard.registerClipboardViewerChecked(XClipboard.java:166)
- locked java.lang.Object@7ac3597e
at sun.awt.datatransfer.SunClipboard.addFlavorListener(SunClipboard.java:377)
- locked sun.awt.X11.XClipboard@59383e0f
...
"AWT-XAWT" Id=12 BLOCKED on java.lang.Object@7ac3597e owned by
"AWT-EventQueue-0" Id=15
at sun.awt.X11.XClipboard$CheckChangeTimerTask.run(XClipboard.java:180)
- blocked on java.lang.Object@7ac3597e
at sun.awt.X11.XToolkit.callTimeoutTasks(XToolkit.java:1922)
at sun.awt.X11.XToolkit.run(XToolkit.java:558)
at sun.awt.X11.XToolkit.run(XToolkit.java:523)
at java.lang.Thread.run(Thread.java:745)
Number of locked synchronizers = 1
- java.util.concurrent.locks.ReentrantLock$NonfairSync@2943444d
reproduce, it looks like a simple deadlock between a monitor lock and a
ReentrantLock in the AWT clipboard support.
Deadlock detected:
==================
"System clipboard synchronizer":
waiting to lock sun.awt.X11.XClipboard@59383e0f
which is held by "AWT-EventQueue-0"
"AWT-EventQueue-0":
waiting to lock
java.util.concurrent.locks.ReentrantLock$NonfairSync@2943444d
which is held by "AWT-XAWT"
"AWT-XAWT":
waiting to lock java.lang.Object@7ac3597e
which is held by "AWT-EventQueue-0"
Stacks for threads in question:
"AWT-EventQueue-0" Id=15 WAITING on
java.util.concurrent.locks.ReentrantLock$NonfairSync@2943444d owned by
"AWT-XAWT" Id=12
at sun.misc.Unsafe.park(Native Method)
- waiting on java.util.concurrent.locks.ReentrantLock$NonfairSync@2943444d
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
at sun.awt.SunToolkit.awtLock(SunToolkit.java:253)
at sun.awt.X11.XRootWindow.getInstance(XRootWindow.java:36)
at sun.awt.X11.XBaseWindow.getXAWTRootWindow(XBaseWindow.java:412)
at sun.awt.X11.XClipboard.registerClipboardViewerChecked(XClipboard.java:166)
- locked java.lang.Object@7ac3597e
at sun.awt.datatransfer.SunClipboard.addFlavorListener(SunClipboard.java:377)
- locked sun.awt.X11.XClipboard@59383e0f
...
"AWT-XAWT" Id=12 BLOCKED on java.lang.Object@7ac3597e owned by
"AWT-EventQueue-0" Id=15
at sun.awt.X11.XClipboard$CheckChangeTimerTask.run(XClipboard.java:180)
- blocked on java.lang.Object@7ac3597e
at sun.awt.X11.XToolkit.callTimeoutTasks(XToolkit.java:1922)
at sun.awt.X11.XToolkit.run(XToolkit.java:558)
at sun.awt.X11.XToolkit.run(XToolkit.java:523)
at java.lang.Thread.run(Thread.java:745)
Number of locked synchronizers = 1
- java.util.concurrent.locks.ReentrantLock$NonfairSync@2943444d
- backported by
-
JDK-8085812 Deadlock in awt clipboard
- Resolved
-
JDK-8129149 Deadlock in awt clipboard
- Resolved
-
JDK-8129673 Deadlock in awt clipboard
- Resolved
-
JDK-8135922 Deadlock in awt clipboard
- Resolved
-
JDK-8138234 Deadlock in awt clipboard
- Resolved