Skip to content

Conversation

@azvegint
Copy link
Member

@azvegint azvegint commented Nov 17, 2022

This test needs more stabilization:

  • The test can be easily hang by replacing
    iteration on keycharHash.elements() with keycharHash.forEach((k, v) -> punchCtrlKey(robot, v));
    I do not see any reason why we need a synchronized Hashtable, so switched to HashMap
    Looks like it might be a reason of original test hanging.
  • keyRelease, dispose calls wrapped with finally block
  • Just to be safe added timeout @run main/timeout=600 ( none of the CI test runs took too long thought)

CI testing looks good on all platforms.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8252713: jtreg time out of CtrlASCII.java seems to hang the Xserver.

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11214/head:pull/11214
$ git checkout pull/11214

Update a local copy of the PR:
$ git checkout pull/11214
$ git pull https://git.openjdk.org/jdk pull/11214/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11214

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11214.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 17, 2022

👋 Welcome back azvegint! 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 Pull request is ready for review label Nov 17, 2022
@openjdk
Copy link

openjdk bot commented Nov 17, 2022

@azvegint 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 client-libs-dev@openjdk.org label Nov 17, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 17, 2022

Webrevs

Copy link
Contributor

@prrace prrace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a deadlock on the table access, due to some internals of Hashtable this should cure it.
Although I wonder if that wouldn't be a bug in the collections classes ?

@openjdk
Copy link

openjdk bot commented Nov 17, 2022

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

8252713: jtreg time out of CtrlASCII.java seems to hang the Xserver.

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

  • a53be20: 8282404: DrawStringWithInfiniteXform.java failed with "RuntimeException: drawString with InfiniteXform transform takes long time"
  • 66228f7: 8297074: Use enhanced-for cycle instead of Enumeration in javax.crypto
  • 819af69: 8249693: java/nio/channels/FileChannel/FileExtensionAndMap.java uses @ignore w/o bug id
  • 9c432a0: 8297165: Update Pandoc to version 2.19.2 for Oracle builds
  • 8b140e2: 8297152: Add a @sealedGraph tag to ZoneId
  • 992f209: 8287180: Update IANA Language Subtag Registry to Version 2022-08-08
  • a768fed: 8297184: Test runtime/ErrorHandling/TestSigInfoInHsErrFile.java is failing
  • 134acab: 8297149: REDO JDK-8296889: Race condition when cancelling a request
  • 4120db1: 8297007: IGV: Link/Unlink node selection of open tabs
  • 38eb80d: 8296975: RISC-V: Enable UseRVA20U64 profile by default
  • ... and 35 more: https://git.openjdk.org/jdk/compare/eac26f4eb2b717676267c75e65e76fc3b958c9a7...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 Pull request is ready to be integrated label Nov 17, 2022
@azvegint
Copy link
Member Author

azvegint commented Nov 17, 2022

Although I wonder if that wouldn't be a bug in the collections classes ?

Don't think so,

  • invokeAndWait is called on main thread while holding lock on the hashtable
  • synchronized Hastable#containsKey method is called on EDT

So EDT is blocked by hashtable, main is waiting while event posted to EDT will be processed.

We might want to revisit usage of Hashtable in our tests.

stacktraces are below:

"main" #1 [223509] prio=5 os_prio=0 cpu=646,16ms elapsed=70,88s tid=0x00007fe2d4029a70 nid=223509 in Object.wait() [0x00007fe2d9449000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait0(java.base@20-ea/Native Method)
- waiting on <0x0000000629436510> (a java.awt.EventQueue$1AWTInvocationLock)
at java.lang.Object.wait(java.base@20-ea/Object.java:366)
at java.lang.Object.wait(java.base@20-ea/Object.java:339)
at java.awt.EventQueue.invokeAndWait(java.desktop@20-ea/EventQueue.java:1365)
- locked <0x0000000629436510> (a java.awt.EventQueue$1AWTInvocationLock)
at java.awt.EventQueue.invokeAndWait(java.desktop@20-ea/EventQueue.java:1346)
at sun.awt.SunToolkit.realSync(java.desktop@20-ea/SunToolkit.java:1492)
at sun.awt.SunToolkit.realSync(java.desktop@20-ea/SunToolkit.java:1438)
at java.awt.Robot.waitForIdle(java.desktop@20-ea/Robot.java:688)
- locked <0x0000000629428d30> (a java.awt.Robot)
at java.awt.Robot.autoWaitForIdle(java.desktop@20-ea/Robot.java:619)
at java.awt.Robot.afterEvent(java.desktop@20-ea/Robot.java:592)
at java.awt.Robot.keyRelease(java.desktop@20-ea/Robot.java:371)
- locked <0x0000000629428d30> (a java.awt.Robot)
at CtrlASCII.punchCtrlKey(CtrlASCII.java:225)
at CtrlASCII.lambda$start$0(CtrlASCII.java:202)
at CtrlASCII$$Lambda$343/0x0000000801151088.accept(Unknown Source)
at java.util.Hashtable.forEach(java.base@20-ea/Hashtable.java:893)
- locked <0x00000006298b6b40> (a java.util.Hashtable)

at CtrlASCII.start(CtrlASCII.java:201)
at CtrlASCII.main(CtrlASCII.java:162)
at java.lang.invoke.LambdaForm$DMH/0x0000000801030c00.invokeStatic(java.base@20-ea/LambdaForm$DMH)
at java.lang.invoke.LambdaForm$MH/0x0000000801158000.invoke(java.base@20-ea/LambdaForm$MH)
at java.lang.invoke.Invokers$Holder.invokeExact_MT(java.base@20-ea/Invokers$Holder)
at jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(java.base@20-ea/DirectMethodHandleAccessor.java:155)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(java.base@20-ea/DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke(java.base@20-ea/Method.java:578)
at com.sun.tools.javac.launcher.Main.execute(jdk.compiler@20-ea/Main.java:435)
at com.sun.tools.javac.launcher.Main.run(jdk.compiler@20-ea/Main.java:205)
at com.sun.tools.javac.launcher.Main.main(jdk.compiler@20-ea/Main.java:132)

"AWT-EventQueue-0" #43 [223550] prio=6 os_prio=0 cpu=26,14ms elapsed=70,34s tid=0x00007fe21c006200 nid=223550 waiting for monitor entry [0x00007fe2a02e7000]
java.lang.Thread.State: BLOCKED (on object monitor)
at java.util.Hashtable.containsKey(java.base@20-ea/Hashtable.java:352)
- waiting to lock <0x00000006298b6b40> (a java.util.Hashtable)
at CtrlASCII.keyTyped(CtrlASCII.java:241)
at java.awt.Component.processKeyEvent(java.desktop@20-ea/Component.java:6575)
at java.awt.Component.processEvent(java.desktop@20-ea/Component.java:6397)
at java.awt.TextComponent.processEvent(java.desktop@20-ea/TextComponent.java:694)
at java.awt.TextField.processEvent(java.desktop@20-ea/TextField.java:637)
at java.awt.Component.dispatchEventImpl(java.desktop@20-ea/Component.java:4995)
at java.awt.Component.dispatchEvent(java.desktop@20-ea/Component.java:4827)
at java.awt.KeyboardFocusManager.redispatchEvent(java.desktop@20-ea/KeyboardFocusManager.java:1952)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(java.desktop@20-ea/DefaultKeyboardFocusManager.java:883)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(java.desktop@20-ea/DefaultKeyboardFocusManager.java:1146)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(java.desktop@20-ea/DefaultKeyboardFocusManager.java:1020)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(java.desktop@20-ea/DefaultKeyboardFocusManager.java:848)
at java.awt.Component.dispatchEventImpl(java.desktop@20-ea/Component.java:4876)
at java.awt.Container.dispatchEventImpl(java.desktop@20-ea/Container.java:2324)
at java.awt.Window.dispatchEventImpl(java.desktop@20-ea/Window.java:2780)
at java.awt.Component.dispatchEvent(java.desktop@20-ea/Component.java:4827)
at java.awt.EventQueue.dispatchEventImpl(java.desktop@20-ea/EventQueue.java:775)
at java.awt.EventQueue$4.run(java.desktop@20-ea/EventQueue.java:720)
at java.awt.EventQueue$4.run(java.desktop@20-ea/EventQueue.java:714)
at java.security.AccessController.executePrivileged(java.base@20-ea/AccessController.java:778)
at java.security.AccessController.doPrivileged(java.base@20-ea/AccessController.java:400)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(java.base@20-ea/ProtectionDomain.java:87)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(java.base@20-ea/ProtectionDomain.java:98)
at java.awt.EventQueue$5.run(java.desktop@20-ea/EventQueue.java:747)
at java.awt.EventQueue$5.run(java.desktop@20-ea/EventQueue.java:745)
at java.security.AccessController.executePrivileged(java.base@20-ea/AccessController.java:778)
at java.security.AccessController.doPrivileged(java.base@20-ea/AccessController.java:400)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(java.base@20-ea/ProtectionDomain.java:87)
at java.awt.EventQueue.dispatchEvent(java.desktop@20-ea/EventQueue.java:744)
at java.awt.EventDispatchThread.pumpOneEventForFilters(java.desktop@20-ea/EventDispatchThread.java:203)
at java.awt.EventDispatchThread.pumpEventsForFilter(java.desktop@20-ea/EventDispatchThread.java:124)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(java.desktop@20-ea/EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(java.desktop@20-ea/EventDispatchThread.java:109)
at java.awt.EventDispatchThread.pumpEvents(java.desktop@20-ea/EventDispatchThread.java:101)
at java.awt.EventDispatchThread.run(java.desktop@20-ea/EventDispatchThread.java:90)





@azvegint
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 22, 2022

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

  • 88957a7: 8297147: UnexpectedSourceImageSize test times out on slow machines when fastdebug is used
  • 0696854: 8297299: SequenceInputStream should not use Vector
  • f0e99c6: 8297301: Cleanup unused methods in JavaUtilJarAccess
  • 392ac70: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response
  • 5a45c25: 8297164: Update troff man pages and CheckManPageOptions.java
  • f12710e: 8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions
  • cd6a203: 8297348: make CONF=xxx should match if xxx is an exact match
  • 817e039: 8297352: configure should check pandoc version
  • 15e2e28: 8297353: Regenerated checked-in html files with new pandoc
  • b366d17: 8294073: Performance improvement for message digest implementations
  • ... and 95 more: https://git.openjdk.org/jdk/compare/eac26f4eb2b717676267c75e65e76fc3b958c9a7...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 22, 2022
@openjdk openjdk bot closed this Nov 22, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 22, 2022
@openjdk
Copy link

openjdk bot commented Nov 22, 2022

@azvegint Pushed as commit 6d6046b.

💡 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 client-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants