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

Philip Race philip.race at oracle.com
Tue Apr 7 22:04:40 UTC 2020


There were previous attempts to fix this on mac :
https://mail.openjdk.java.net/pipermail/awt-dev/2013-December/006719.html
https://mail.openjdk.java.net/pipermail/awt-dev/2014-January/006809.html
https://mail.openjdk.java.net/pipermail/awt-dev/2014-February/007047.html

which you reviewed. Can you comment on how the current proposal avoids
the problems raised there ?

-phil.

On 4/6/20, 12:20 AM, Sergey Bylokhov wrote:
> 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.
>
>


More information about the awt-dev mailing list