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

8202667: java/awt/Debug/DumpOnKey/DumpOnKey.java times out on Windows #6194

Closed
wants to merge 1 commit into from

Conversation

azuev-java
Copy link
Member

@azuev-java azuev-java commented Nov 1, 2021

Looks like the problem occurs when system is slow to actually close windows,
then keyboard events are going to the wrong window. The idea of the fix is to
bring the new window to front before actual testing starts and close window
on EDT and then wait for 2 seconds for actual hardware window to disappear.


Progress

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

Issue

  • JDK-8202667: java/awt/Debug/DumpOnKey/DumpOnKey.java times out on Windows

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6194/head:pull/6194
$ git checkout pull/6194

Update a local copy of the PR:
$ git checkout pull/6194
$ git pull https://git.openjdk.java.net/jdk pull/6194/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6194

View PR using the GUI difftool:
$ git pr show -t 6194

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6194.diff

Remove test from problem list.
Double the robot autodelay to 100.
Add explicit toFront() and requestFocus() on window.
Dispose window on EDT and then wait for 2 seconds before exiting test.
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Nov 1, 2021

👋 Welcome back kizune! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr label Nov 1, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Nov 1, 2021

@azuev-java The following label will be automatically applied to this pull request:

  • client

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 client label Nov 1, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Nov 1, 2021

Webrevs

@mrserb
Copy link
Member

@mrserb mrserb commented Nov 1, 2021

From the stack traces in the bug report, it seems that the problem was in some kind of deadlock in the SunToolkit.waitForIdle

@azuev-java
Copy link
Member Author

@azuev-java azuev-java commented Nov 1, 2021

From the stack traces in the bug report, it seems that the problem was in some kind of deadlock in the SunToolkit.waitForIdle

I was not able to reproduce the deadlock scenario - and i ran this test about 3 hours non-stop which resulted in more than 2000 invocations. I had couple of false positives where dump was expected but did not happened due to the mismatch between the windows that receiving key pressed and key released events and that is what i tried to fix to make test more stable. But neither locally nor on remote test machines i was not able to reproduce it exactly the way it reported. Giving the extensive use of Robot.waitForIdle() in other tests without any issue my only approach is to make this test more stable and enable it for execution and then see if it will timeout again. I doubt so.

@prrace
Copy link
Contributor

@prrace prrace commented Nov 2, 2021

When originally reported this test frequently timed out. So if it didn't have the same timeout in 2000 iterations
perhaps the root cause of that is fixed ? Any ideas what that fix might have been ?
But with that and these modifications we can put this test back into production

prrace
prrace approved these changes Nov 2, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Nov 2, 2021

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

8202667: java/awt/Debug/DumpOnKey/DumpOnKey.java times out on Windows

Reviewed-by: prr

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 109 new commits pushed to the master branch:

  • acceffc: 8273704: DrawStringWithInfiniteXform.java failed : drawString with InfiniteXform transform takes long time
  • 2eafa03: 8276234: Trivially clean up locale-related code
  • 47e7a42: 8262945: [macos] Regression Manual Test for Key Events Fails
  • 99b7b95: 8276205: Shenandoah: CodeCache_lock should always be held for initializing code cache iteration
  • 9771544: 8260428: Drop support for pre JDK 1.4 DatagramSocketImpl implementations
  • e265f83: 8276107: Preventive collections trigger before maxing out heap
  • c8abe35: 8276121: G1: Remove unused and uninitialized _g1h in g1SATBMarkQueueSet.hpp
  • f55e68c: 8275950: Use only _thread_in_vm in ~ThreadBlockInVMPreprocess()
  • 4ac8403: 8276218: JFR: Clean up jdk.jfr.dcmd
  • 89ade1d: 8273416: C2: assert(false) failed: bad AD file after JDK-8252372 with UseSSE={0,1}
  • ... and 99 more: https://git.openjdk.java.net/jdk/compare/fab3d6c6122b2ce23dfa12db489923d8261f8f35...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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Nov 2, 2021
@azuev-java
Copy link
Member Author

@azuev-java azuev-java commented Nov 2, 2021

Any ideas what that fix might have been ?

There were some modifications to the problematic methods in SunToolkit including JDK-8196100 which would be the reason this test stopped deadlocking in that particular method.

@azuev-java
Copy link
Member Author

@azuev-java azuev-java commented Nov 2, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Nov 2, 2021

Going to push as commit cd778f5.
Since your change was applied there have been 117 commits pushed to the master branch:

  • b889f2a: 8276175: codestrings.validate_vm gtest still broken on ppc64 after JDK-8276046
  • 5b4e398: 8275766: (tz) Update Timezone Data to 2021e
  • 8630f55: 8275406: Add copy-to-clipboard feature to snippet UI
  • 9971a2c: 8275735: [linux] Remove deprecated Metrics api (kernel memory limit)
  • b7a06be: 8252990: Intrinsify Unsafe.storeStoreFence
  • 92be9d8: 8276236: Table headers missing in Formatter api docs
  • 9bf3165: 8276164: RandomAccessFile#write method could throw IndexOutOfBoundsException that is not described in javadoc
  • 0488ebd: 8276105: C2: Conv(D|F)2(I|L)Nodes::Ideal should handle rounding correctly
  • acceffc: 8273704: DrawStringWithInfiniteXform.java failed : drawString with InfiniteXform transform takes long time
  • 2eafa03: 8276234: Trivially clean up locale-related code
  • ... and 107 more: https://git.openjdk.java.net/jdk/compare/fab3d6c6122b2ce23dfa12db489923d8261f8f35...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 2, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Nov 2, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Nov 2, 2021

@azuev-java Pushed as commit cd778f5.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client integrated
3 participants