<AWT Dev>  Review Request: 8208702 javax/swing/reliability/HangDuringStaticInitialization.java may hang on macos
Sergey.Bylokhov at oracle.com
Tue Oct 30 00:57:09 UTC 2018
Any volunteers to review? =)
On 06/08/2018 19:06, Sergey Bylokhov wrote:
> Please review the fix for jdk12.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8208702
> Webrev: http://cr.openjdk.java.net/~serb/8208702/webrev.01
> The new test which was added as part of JDK-8189604 may hang on macOS if it is run via ssh, and the user used in ssh and the current user in GUI login session are different. But it works if the users are the same.
> This is part of the spec describe why it works in some cases and does not work in another:
> "The reasons for this non-obvious behavior are lost in the depths of history. However, the fact that this works at all is pretty much irrelevant because there are important caveats that prevent it from being truly useful."
> Also please take a look to the "Listing 6" in the link above, which describe similar situation.
> Note that by default in such environment the java will use the headless toolkit which works fine. But the test forces to use the "headful toolkit" using "-Djava.awt.headless=false", which causes a hang in our Appkit initialization.
> On unix in the same circumstances we will throw the AWTError. I have implemented the same on macOS. If "Security Context" reports that "sessionHasGraphicAccess" is false and the user requests "headful toolkit" we will throw AWTError.
>  https://bugs.openjdk.java.net/browse/JDK-8189604
>  http://hg.openjdk.java.net/jdk/client/file/f91e995f6d5c/src/java.base/unix/native/libjava/java_props_md.c#l405
>  http://hg.openjdk.java.net/jdk/client/file/f91e995f6d5c/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c#l758
>  https://developer.apple.com/library/archive/technotes/tn2083/_index.html#//apple_ref/doc/uid/DTS10003794-CH1-SUBSECTION19
Best regards, Sergey.
More information about the awt-dev