<AWT Dev> [9] Review request for 8129116: Deadlock with multimonitor fullscreen windows.

Alexander Zvegintsev alexander.zvegintsev at oracle.com
Thu Jun 18 13:47:28 UTC 2015


please review the fix
for the issue

This deadlock occurs when we setting a fullscreen window on each 
graphics device sequentially without a delay.
             EventQueue.invokeAndWait(() -> {
                 for (GraphicsDevice device : devices) {
                     device.setFullScreenWindow(new Frame());

It happens even for non-exclusive fullscreen mode too (before the 
JDK-8051617[0] fix).

Currently we are dispatching events in XToolkit under the awtLock. The 
fix simply releases this acquired awtLock to avoid deadlock.
However we have a couple of issues ([1], [2]) with similar fixes. This 
repetitive pattern doesn't look good to me,
so I created JDK-8129119 [3] to consider releasing awtLock upon 
dispatchEvent call in XToolkit.

[0] https://bugs.openjdk.java.net/browse/JDK-8051617 Fullscreen mode is 
not working properly on Xorg
[1] https://bugs.openjdk.java.net/browse/JDK-7158311 
GraphicsDevice.setDisplayMode(...) leads to hang when DISPLAY variable 
points to Oracle Linux
[2] https://bugs.openjdk.java.net/browse/JDK-7155963 Deadlock in 
SystemFlavorMap.getFlavorsForNative and SunToolkit.awtLock
[3] https://bugs.openjdk.java.net/browse/JDK-8129119 Consider reducing 
the time while the AWTLock is held



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20150618/ab577c5a/attachment.html>

More information about the awt-dev mailing list