New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8273617: UninitializedDisplayModeChangeTest.java times out on macOS 12 #5647
Conversation
👋 Welcome back psadhukhan! A progress list of the required criteria for merging this PR into |
@prsadhuk this pull request can not be integrated into git checkout JDK-8273617
git fetch https://git.openjdk.java.net/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
Webrevs
|
Mach5 Test job running for several iterations for all platforms (including macos 12 both x64 and aarch64) is green |
It intentionally waits forever since if the child process is alive some bug has occurred. So you need to find why the child hangs. |
Can you point out which bugs you were referring to if we don't wait for ever? AFAICT, it was done that way in jdk6(JDK-6358034) because there was no provision for waitFor(timeout), it only has waitFor() API...If test cannot finish/change display in 30secs, then it should fail.. |
Are you sure that if it cannot change the display in two minutes it should pass? It looks like an important bug. |
The child process executing DisplayModeChanger class hangs when it is supposed to go into windowed mode in gd.setFullScreenWindow(null) call. Basically, setFullScreenWindow() calls CGGraphicsDevice.java#setFullScreenWindow which calls JNI nativeSetDisplayMode which does CGBeginDisplayConfiguration, CGConfigureDisplayWithDisplayMode and CGCompleteDisplayConfiguration. Now, DisplayModeChanger class calls setFullScreenWindow to go to fullscreen mode and then to windowed mode. But when it is called for windowed mode, Java_sun_awt_CGraphicsDevice_nativeSetDisplayMode() is called with displayId:724860118, w:1920, h:1080, bpp:32, refrate 60 and CGCompleteDisplayConfiguration hangs. For macos11, also the same code flow is followed with same values but CGCompleteDisplayConfiguration executes and the testcase works. |
So this is not a test issue, I guess you should report this bug to Apple using some standalone native example. |
Since CGCompleteDisplayConfiguration hangs if we ask the thread to wait, remove thread blocking allows the test to run on all CI macos version. |
I am not sure that it is a good thing to add a workaround to the code just to pass the test. The appkit still will be locked and any call to it will hang as well. You can achieve the same test result by commenting out the "gd.setFullScreenWindow(null)", no code no problems, but I do not think it is the right thing to do. |
Why it is considered a workaround? There are many instances where we use [ThreadUtilities performOnMainThreadWaiting:NO block:^() |
It is a workaround because it does not fix the hang, but just skips part of the functionality. Since appkit hangs any UI operations will be blocked, and the app become broken |
If changing waiting to NO doesn't fix the hang, then test would still hang and time out wouldn't it ? |
@prsadhuk This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@prsadhuk This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
java/awt/FullScreen/UninitializedDisplayModeChangeTest/UninitializedDisplayModeChangeTest.java is timing out every time on macOS 12 even though the test passed.
Looks like the the main process waits for child process created in the test forever, making it timeout after jtreg timeout of 2min.
Modified to wait for childprocess for 30secs.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5647/head:pull/5647
$ git checkout pull/5647
Update a local copy of the PR:
$ git checkout pull/5647
$ git pull https://git.openjdk.java.net/jdk pull/5647/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5647
View PR using the GUI difftool:
$ git pr show -t 5647
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5647.diff