Skip to content

8204868: java/util/zip/ZipFile/TestCleaner.java still fails with "cleaner failed to clean zipfile." #23742

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
wants to merge 1 commit into from

Conversation

jaikiran
Copy link
Member

@jaikiran jaikiran commented Feb 24, 2025

Can I please get a review of this test-only change which proposes to address an intermittent failure in the test/jdk/java/util/zip/ZipFile/TestCleaner.java test?

This test does operations on Inflater/Deflater/ZipFile and closes those instances and then waits for GC to kick in. After wait for a second, it then checks that the underlying resources held by these instances have been cleaned (by the Cleaner).

Once in a while, we have noticed that this test fails because the resources haven't been cleaned. I suspect this is because within the (fixed) 1 second wait time, the Cleaner hasn't yet invoked the cleaning action for these instances.

The commit in this PR updates the test to run it in othervm so that the Cleaner actions aren't delayed by any other test or code that might have previously run on the agentvm. Furthermore, the test is also updated to the use the ForceGC test util which takes into account the jtreg test timeout factor for deciding how long to wait for the Cleaner to initiate the cleaning action. Our CI is configured with a timeout factor of 4, so with this change, instead of a fixed maximum 1 second wait time, the test will now wait a maximum of 4 seconds for the cleaner action to be invoked.

The test continues to pass with this change, even with a repeat execution of 50 runs.


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-8204868: java/util/zip/ZipFile/TestCleaner.java still fails with "cleaner failed to clean zipfile." (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23742

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 24, 2025

👋 Welcome back jpai! 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 24, 2025

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

8204868: java/util/zip/ZipFile/TestCleaner.java still fails with "cleaner failed to clean zipfile."

Reviewed-by: lancea

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

  • ea2c923: 8323807: Async UL: Add a stalling mode to async UL
  • e7d4b36: 8350667: Remove startThread_lock() and _startThread_lock on AIX
  • 1e18fff: 8328473: StringTable and SymbolTable statistics delay time to safepoint
  • a0dd565: 8350643: G1: Make loop iteration variable type correspond to limit in G1SurvRateGroup
  • aac9cb4: 8349906: G1: Improve initial survivor rate for newly used young regions
  • a431046: 8350518: org.openjdk.bench.java.util.TreeMapUpdate.compute fails with "java.lang.IllegalArgumentException: key out of range"
  • a70eba8: 8330174: Protection zone for easier detection of accidental zero-nKlass use
  • f529bf7: 8350483: AArch64: turn on signum intrinsics by default on Ampere CPUs
  • 037e471: 8350666: cmp-baseline builds fail after JDK-8280682
  • c8a521f: 8345213: JVM Prefers /etc/timezone Over /etc/localtime on Debian 12
  • ... and 31 more: https://git.openjdk.org/jdk/compare/302bed055c3b4881f97c584d5953273b9dbc2969...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 24, 2025
@openjdk
Copy link

openjdk bot commented Feb 24, 2025

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

  • core-libs

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 core-libs core-libs-dev@openjdk.org label Feb 24, 2025
@mlbridge
Copy link

mlbridge bot commented Feb 24, 2025

Webrevs

@kimbarrett
Copy link

Not a review, just a drive-by comment.
There is discussion happening in #22165
about perhaps adding a facility that would also provide a reliable solution to
this problem.

Copy link
Contributor

@LanceAndersen LanceAndersen left a comment

Choose a reason for hiding this comment

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

Hi Jai,

I think the changes look ok overall. Thank you for tackling this one.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 26, 2025
@bchristi-git
Copy link
Member

There is discussion happening in #22165 about perhaps adding a facility that would also provide a reliable solution to this problem.

If we end up with such a facility, perhaps ForceGC could be reworked to use it.

@jaikiran
Copy link
Member Author

jaikiran commented Mar 6, 2025

Thank you Lance for the review. I'll go ahead and integrate this now. For any new utility method, if it gets introduced in the Cleaner, like Brent notes we can rework the implementation of this test util at that time.

@jaikiran
Copy link
Member Author

jaikiran commented Mar 6, 2025

/integrate

@openjdk
Copy link

openjdk bot commented Mar 6, 2025

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

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 6, 2025

@jaikiran Pushed as commit 3626ac3.

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

@jaikiran jaikiran deleted the 8204868 branch March 6, 2025 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants