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
JDK-8244088: [Regression] Switch of Gnome theme ends up in deadlocked UI #932
Conversation
Hi @jaysk1, welcome to this OpenJDK project and thanks for contributing! We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user jaysk1" as summary for the issue. If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing |
/covered |
Thank you! Please allow for a few business days to verify that your employer has signed the OCA. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated! |
Webrevs
|
I'll run the tests for the proposed fix. |
@@ -350,10 +350,8 @@ Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeFinishPainting( | |||
JNIEXPORT void JNICALL Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1switch_1theme( | |||
JNIEnv *env, jobject this) | |||
{ | |||
// Note that flush_gtk_event_loop takes care of locks (7053002) | |||
gtk->gdk_threads_enter(); | |||
// Note that gtk->flush_event_loop takes care of locks (7053002) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Different people used these methods (gdk_threads_enter/gdk_threads_leave) here twice which caused two regressions. Looks like the comment about locks is not enough. Could you please update the comment and state that gdk_threads_enter/gdk_threads_leave must not be used here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrserb: Yes will add the additional comment here.
Like you have rightly said, Yes there is 2 regression here:
- For GTK3's g_main_context_iteration they have included an extra lock (gdk_threads_enter/gdk_threads_leave) which was causing a deadlock
- The definition of g_main_context_iteration module in new “gtk3_interface.h” is defined using a single parameter causing the hang in XToolkit_waitForEvents
So
- In Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1switch_1theme () method removed the extra lock.
- Corrected the g_main_context_iteration module definaition accordingly https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#g-main-context-iteration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrserb: I have addressed the review comment. Thanks!
The testing of the patch is in-progress. |
@jaysk1 This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 176 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@mrserb) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
/integrate |
/sponsor |
@mrserb @jaysk1 Since your change was applied there have been 188 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit a7f4691. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Issue
https://bugs.openjdk.java.net/browse/JDK-8244088
Problem
While using GTK3 java implementation, User sees a deadlock issue in UI while trying to switch themes in gnome-tweak-tool.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/932/head:pull/932
$ git checkout pull/932