Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

jaysk1
Copy link
Contributor

@jaysk1 jaysk1 commented Oct 29, 2020

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

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8244088: [Regression] Switch of Gnome theme ends up in deadlocked UI

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/932/head:pull/932
$ git checkout pull/932

@bridgekeeper bridgekeeper bot added the oca Needs verification of OCA signatory status label Oct 29, 2020
@bridgekeeper
Copy link

bridgekeeper bot commented Oct 29, 2020

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 /signed in a comment in this pull request.

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 in a comment in this pull request.

@jaysk1
Copy link
Contributor Author

jaysk1 commented Oct 29, 2020

/covered

@bridgekeeper bridgekeeper bot added the oca-verify Needs verification of OCA signatory status label Oct 29, 2020
@bridgekeeper
Copy link

bridgekeeper bot commented Oct 29, 2020

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!

@openjdk
Copy link

openjdk bot commented Oct 29, 2020

@jaysk1 The following label will be automatically applied to this pull request:

  • awt

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the awt client-libs-dev@openjdk.org label Oct 29, 2020
@jaysk1 jaysk1 changed the title JDK-8244088 Switch of Gnome theme ends up in deadlocked UI JDK-8244088: [Regression] Switch of Gnome theme ends up in deadlocked UI Oct 29, 2020
@bridgekeeper bridgekeeper bot removed oca Needs verification of OCA signatory status oca-verify Needs verification of OCA signatory status labels Oct 29, 2020
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 29, 2020
@mlbridge
Copy link

mlbridge bot commented Oct 29, 2020

Webrevs

@mrserb
Copy link
Member

mrserb commented Nov 3, 2020

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)
Copy link
Member

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?

Copy link
Contributor Author

@jaysk1 jaysk1 Nov 9, 2020

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:

  1. For GTK3's g_main_context_iteration they have included an extra lock (gdk_threads_enter/gdk_threads_leave) which was causing a deadlock
  2. 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

  1. In Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1switch_1theme () method removed the extra lock.
  2. 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

Copy link
Contributor Author

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!

@mrserb
Copy link
Member

mrserb commented Nov 9, 2020

The testing of the patch is in-progress.

@openjdk
Copy link

openjdk bot commented Nov 10, 2020

@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:

8244088: [Regression] Switch of Gnome theme ends up in deadlocked UI

Reviewed-by: serb

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 master branch:

  • c601849: 8256038: G1: Improve comment about mark word handling of displaced mark words
  • a38dd53: 8256040: Shenandoah: Allow NULL referent in ShenandoahReferenceProcessor::should_discover()
  • 01567b5: 8256036: Shenandoah: MethodHandles adapters section overflows after JDK-8255762
  • 4bc065c: 8255782: Turn UseTLAB and ResizeTLAB from product_pd to product, defaulting to "true"
  • b5d78af: 8254863: Delete code leftover from old fixes
  • 8066b33: 8253905: Update sanity test suite to not place windows at (0,0)
  • f71f9dc: 8255949: AArch64: Add support for vectorized shift right and accumulate
  • 1332ba3: 8256039: Shenandoah: runtime/stringtable/StringTableCleaningTest.java fails
  • 11431b1: 4619330: All built-in java.awt.color.ColorSpace fields should be specified as such
  • 17f04fc: 8254078: DataOutputStream is very slow post-disabling of Biased Locking
  • ... and 166 more: https://git.openjdk.java.net/jdk/compare/579e50bb404a5a858299841803a1f99441630aa5...master

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 in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 10, 2020
@jaysk1
Copy link
Contributor Author

jaysk1 commented Nov 10, 2020

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Nov 10, 2020
@openjdk
Copy link

openjdk bot commented Nov 10, 2020

@jaysk1
Your change (at version fc2d36b) is now ready to be sponsored by a Committer.

@mrserb
Copy link
Member

mrserb commented Nov 10, 2020

/sponsor

@openjdk openjdk bot closed this Nov 10, 2020
@openjdk openjdk bot added integrated Pull request has been integrated and removed sponsor Pull request is ready to be sponsored ready Pull request is ready to be integrated labels Nov 10, 2020
@openjdk
Copy link

openjdk bot commented Nov 10, 2020

@mrserb @jaysk1 Since your change was applied there have been 188 commits pushed to the master branch:

  • bd3e65b: 8256052: Remove unused allocation type from fieldInfo
  • 6d8acd2: 8256066: Tests use deprecated TestNG API that is no longer available in new versions
  • 643969a: 8255822: Zero: improve build-time JVMTI handling
  • 6ae5e5b: 8221404: C2: Convert RegMask and IndexSet to use uintptr_t
  • 6555996: 8253600: G1: Fully support pinned regions for full gc
  • 97d6e4a: 8256046: Shenandoah: Mix-in NULL_PTR in non-strong ShLRBNode's type
  • a1d4b9f: 8256009: Remove src/hotspot/share/adlc/Test/i486.ad
  • 3455fa9: 8256050: JVM crashes with -XX:+PrintDeoptimizationDetails
  • e6df13e: 8256054: C2: Floating-point min/max operations on vectors intermittently produce wrong results for NaN values
  • 52805f5: 8256048: Incomplete gitignore setting for netbeans project
  • ... and 178 more: https://git.openjdk.java.net/jdk/compare/579e50bb404a5a858299841803a1f99441630aa5...master

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.

@openjdk openjdk bot removed the rfr Pull request is ready for review label Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awt client-libs-dev@openjdk.org integrated Pull request has been integrated
2 participants