<AWT Dev> RFR: 7185258 [macosx] Deadlock in SunToolKit.realSync()

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Mon Apr 6 07:20:00 UTC 2020


Hello.
Please review the fix for jdk/client.

Bug: https://bugs.openjdk.java.net/browse/JDK-7185258
Fix: http://cr.openjdk.java.net/~serb/7185258/webrev.01

The Robot.waitForIdle and SunToolKit.realSync() may hang if executed when DnD is
in progress, because they posts native events to the application and waits when
these event will be dispatched. During DnD this events are blocked, so every call
to waitForIdle will hang for a timeout(which is 10 seconds) per native event check.
This may appear as a deadlock.

The similar bug was fixed on windows:
http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/7658a78a93de

Solution on macOS is similar, skips the native checks when the DnD is in progress.


-- 
Best regards, Sergey.


More information about the awt-dev mailing list