Skip to content

8294155: Exception thrown before awaitAndCheck hangs PassFailJFrame #23564

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

Closed

Conversation

aivanov-jdk
Copy link
Member

@aivanov-jdk aivanov-jdk commented Feb 11, 2025

If a manual test throws an exception during construction of PassFailJFrame, the test execution hangs. When the builder pattern is used, no UI appears on the screens, but the Java process does not terminate automatically because there are windows which prevent AWT from shutting down.

Fix:

Catch exceptions in PassFailJFrame.Builder.build() and dispose of all the windows if an exception occurs.

This ensures all the created windows are disposed of, which lets AWT shut down cleanly.

Note: the above problem doesn't occur when the test is run with jtreg because jtreg shuts down the JVM as soon as the main thread exits.


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-8294155: Exception thrown before awaitAndCheck hangs PassFailJFrame (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23564

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

Using diff file

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

Using Webrev

Link to Webrev Comment

Catch exceptions in Builder.build() and dispose of all the windows
if an exception occurs.
@bridgekeeper
Copy link

bridgekeeper bot commented Feb 11, 2025

👋 Welcome back aivanov! 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
Copy link

openjdk bot commented Feb 11, 2025

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

8294155: Exception thrown before awaitAndCheck hangs PassFailJFrame

Reviewed-by: serb, azvegint, kizune

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

  • 7a0832f: 8349934: Wrong file regex for copyright header format check in .jcheck/conf
  • 2a5d1da: 8349571: Remove JavaThreadFactory interface from SA
  • 74e458b: 8349684: Remove SA core file tests from problem list for macosx-x64
  • ba28119: 8348427: DeferredLintHandler API should use JCTree instead of DiagnosticPosition
  • c5ac3c4: 8249831: Test sun/security/mscapi/nonUniqueAliases/NonUniqueAliases.java is marked with @ignore
  • 336d0d8: 8349926: [BACKOUT] Support static JDK in libfontmanager/freetypeScaler.c
  • 4b463ee: 8342103: C2 compiler support for Float16 type and associated scalar operations
  • 332d87c: 8349859: Support static JDK in libfontmanager/freetypeScaler.c
  • 73e1780: 8349836: G1: Improve group prediction log message
  • ed17c55: 8349145: Make Class.getProtectionDomain() non-native
  • ... and 12 more: https://git.openjdk.org/jdk/compare/ee079fdbf1c513a4c57ef86a803eb0add651c539...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 rfr Pull request is ready for review label Feb 11, 2025
@openjdk
Copy link

openjdk bot commented Feb 11, 2025

@aivanov-jdk 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 Feb 11, 2025
@mlbridge
Copy link

mlbridge bot commented Feb 11, 2025

Webrevs

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 11, 2025
@aivanov-jdk
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Feb 17, 2025

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

  • 2bd8f02: 8342524: Use latch in AbstractButton/bug6298940.java instead of delay
  • 7f3ecb4: 8346664: C2: Optimize mask check with constant offset
  • b3a4026: 8349764: RISC-V: C1: Improve Class.isInstance intrinsic
  • 071c8f5: 8349909: jdk.internal.jimage.decompressor.ZipDecompressor does not close the Inflater in exceptional cases
  • f1258f9: 8349755: Fix corner case issues in async UL
  • b1b4828: 8350086: Inline hot Method accessors for faster task selection
  • 5e9d72e: 8350094: Linux gcc 13.2.0 build fails when ubsan is enabled
  • 2192723: 8350162: ProblemList compiler/tiered/Level2RecompilationTest.java
  • 7d11418: 8350147: Replace example in KEM class with the one from JEP 452
  • 5cf1132: 8350098: jpackage test lib erroneously will run methods without @test annotation as tests
  • ... and 54 more: https://git.openjdk.org/jdk/compare/ee079fdbf1c513a4c57ef86a803eb0add651c539...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Feb 17, 2025

@aivanov-jdk Pushed as commit 906358d.

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

@aivanov-jdk aivanov-jdk deleted the 8294155-PassFail-exception branch March 22, 2025 17:31
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.

4 participants