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

8295857: Clarify that cleanup code can be skipped when the JVM terminates (e.g. when calling halt()) #11218

Closed
wants to merge 10 commits into from

Conversation

bchristi-git
Copy link
Member

@bchristi-git bchristi-git commented Nov 17, 2022

JDK-8290036 documented the shutdown sequence, noting that calling Runtime.halt() skips the shutdown sequence and immediately terminates the VM. Thus, "threads' current methods do not complete normally or abruptly; no finally clause of any method is executed".

One ramification of this is that resources within try-with-resource blocks will not be released. It would be good to state this explicitly.


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-8295857: Clarify that cleanup code can be skipped when the JVM terminates (e.g. when calling halt())

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11218

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 17, 2022

👋 Welcome back bchristi! 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

@bchristi-git 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 Nov 17, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 17, 2022

Copy link
Member

@bplb bplb left a comment

Choose a reason for hiding this comment

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

Looks good now.

@openjdk
Copy link

openjdk bot commented Nov 17, 2022

@bchristi-git 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:

8295857: Clarify that cleanup code can be skipped when the JVM terminates (e.g. when calling halt())

Reviewed-by: lancea, bpb, naoto, dholmes, smarks

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

  • c16eb89: 8298138: Shenandoah: HdrSeq asserts "sub-bucket index (512) overflow for value ( 1.00)"
  • 3dfadee: 8292289: [vectorapi] Improve the implementation of VectorTestNode
  • d35e840: 8297295: Remove ThreadGroup.allowThreadSuspension
  • 175e3d3: 8296149: Start of release updates for JDK 21
  • d562d3f: 8297642: PhaseIdealLoop::only_has_infinite_loops must detect all loops that never lead to termination
  • fc52f21: 8298255: JFR provide information about dynamization of number of compiler threads
  • e555d54: 8298383: JFR: GenerateJfrFiles.java lacks copyright header
  • c084431: 8298379: JFR: Some UNTIMED events only sets endTime
  • ea108f5: 8298129: Let checkpoint event sizes grow beyond u4 limit
  • 165dcdd: 8297718: Make NMT free:ing protocol more granular
  • ... and 23 more: https://git.openjdk.org/jdk/compare/39344840c7a5fbd37f6c6a972a89c3600396e878...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.

@bplb
Copy link
Member

bplb commented Nov 17, 2022

Is a CSR needed here?

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 17, 2022
@bchristi-git
Copy link
Member Author

Is a CSR needed here?

I will check, though the thought is that these are non-normative clarifications to the normative changes made by 8290036.

@bchristi-git
Copy link
Member Author

(Updated the wording, per comment in the bug report)

@bchristi-git
Copy link
Member Author

Is a CSR needed here?

I will check

A CSR is not needed.

Copy link
Member

@naotoj naotoj left a comment

Choose a reason for hiding this comment

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

Looks good, Brent

@bchristi-git
Copy link
Member Author

What do people think of the latest changes?

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

One nit but otherwise seems fine to me.

Thanks.

src/java.base/share/classes/java/lang/Runtime.java Outdated Show resolved Hide resolved
Copy link
Member

@stuart-marks stuart-marks left a comment

Choose a reason for hiding this comment

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

Looks good!

@bchristi-git
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Dec 12, 2022

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

  • 781a2e0: 8298343: "Could not confirm if TargetJDK is hardened." warning for SA tests on macosx-aarch64-debug
  • 9ff85f6: 8298589: java/net/SctpSanity.java fail with NoClassDefFoundError: sun/nio/ch/sctp/UnsupportedUtil
  • 81f57d5: 8298567: Make field in RandomAccessFile final
  • 56c438b: 8297822: De-duplicate code in module jdk.sctp
  • fabda24: 8296389: C2: PhaseCFG::convert_NeverBranch_to_Goto must handle both orders of successors
  • 6c23b4f: 8298480: Remove unused KlassRemSet
  • 8e5c331: 8298471: Parallel: Don't keep alive nmethods in Young GC
  • d646e32: 8298090: Use String.join() instead of manual loop in DescriptorSupport.toString
  • a37de62: 8298126: Print statistics for objects in CDS archive heap
  • 8ea2a67: 8292265: Add old gen used field at G1HeapSummary JFR event
  • ... and 55 more: https://git.openjdk.org/jdk/compare/39344840c7a5fbd37f6c6a972a89c3600396e878...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Dec 12, 2022

@bchristi-git Pushed as commit c7aca73.

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