-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8332112: Update nsk.share.Log to don't print summary during VM shutdown hook #19209
Conversation
👋 Welcome back lmesnik! A progress list of the required criteria for merging this PR into |
@lmesnik 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:
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 20 new commits pushed to the
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 |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be very little in this PR that pertains to "finalize" so perhaps the JBS title etc could be updated to reflect what most of this PR is actually about.
However, now it is called only during shutdown hook.
Where does this get set up?
Every log (as any Finalazible object) is registered using The line doesn't work as supposed. The object is saved in FnalizerThread stack and never become unreachable. |
Please, not that shutdown hook is not compatible with jtreg agentvm execution. Really, it is not the recommended to use System.exit() and do something after main() in jtreg. Even in main/othervm mode jtreg call class using some wrapper. So the plan is to remove such cleanup as much as possible. |
But you have changed Log so it is no longer a FinalizableObject. ?? Ah I see this is what you meant by disabling it. Now a Log is a plain old Java object with no special cleanup. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay - seems fine. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyrights needs updating.
/integrate |
Going to push as commit 61aff6d.
Your commit was automatically rebased without conflicts. |
The nsk.share.Log doing some cleanup and reporting errors in the cleanup method. This method is supposed to be executed by finalizer originally. However, now it is called only during shutdown hook.
The cleanup using Cleaner doesn't work. See https://bugs.openjdk.org/browse/JDK-8330760
The cleanup() method flush stream and print summary which should be already printed by complain method.
This cleanup is not necessary and printing summary usually is just disabled. It is enabled if the test called 'complain' method. However, the error should have been printed already in this method.
So it would be simple to remove this cleanup and reduce usage of Finalizable in vmTestbase tests.
Note: The 'verboseOnErrorEnabled' is just not used.
See isVerboseOnErrorEnabled.
Tested with by running tests with different combinations (tier4-7) and tier1.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19209/head:pull/19209
$ git checkout pull/19209
Update a local copy of the PR:
$ git checkout pull/19209
$ git pull https://git.openjdk.org/jdk.git pull/19209/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19209
View PR using the GUI difftool:
$ git pr show -t 19209
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19209.diff
Webrev
Link to Webrev Comment