Skip to content

8333108: Update vmTestbase/nsk/share/DebugeeProcess.java to don't use finalization#19437

Closed
lmesnik wants to merge 1 commit intoopenjdk:masterfrom
lmesnik:8333108
Closed

8333108: Update vmTestbase/nsk/share/DebugeeProcess.java to don't use finalization#19437
lmesnik wants to merge 1 commit intoopenjdk:masterfrom
lmesnik:8333108

Conversation

@lmesnik
Copy link
Member

@lmesnik lmesnik commented May 28, 2024

The
test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeProcess.java
uses cleanup() to kill debuggee process.

However, most tests kill the debuggee process explicitly. I verified that debuggee process is killed before test finishes. (Just by printing it's status.)

The fix adds a few checks debuggee.waitFor() int tests that didn't check debuggee process code.


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-8333108: Update vmTestbase/nsk/share/DebugeeProcess.java to don't use finalization (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19437

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 28, 2024

👋 Welcome back lmesnik! 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 May 28, 2024

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

8333108: Update vmTestbase/nsk/share/DebugeeProcess.java to don't use finalization

Reviewed-by: cjplummer, sspitsyn

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

  • 4acafb8: 8333107: javac fails with an exception when processing broken lambda
  • 921860d: 8333264: Remove unused resolve_sub_helper declaration after JDK-8322630
  • 4a20691: 8331876: JFR: Move file read and write events to java.base
  • f608918: 8332614: Type-checked ConstantPool.entryByIndex and ClassReader.readEntryOrNull
  • 1b04f64: 8216984: Deprecate for removal Socket constructors to create UDP sockets
  • 3cff588: 8332826: Make hashCode methods in ArraysSupport friendlier
  • 2b4a4b7: 8326121: vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_cl failed with Full gc happened. Test was useless.
  • 286cc16: 8327401: Some jtreg tests fail on Wayland without any tracking bug
  • 579cf70: 8332597: Remove redundant methods from j.l.classfile.ClassReader API
  • 57bfd0e: 8332065: Calling readLine(null...) or readPassword(null...) on System.console() hangs jshell
  • ... and 63 more: https://git.openjdk.org/jdk/compare/b3b33667ad3bdb7be868fb165a1ea53054947cd0...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 May 28, 2024
@openjdk
Copy link

openjdk bot commented May 28, 2024

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

  • serviceability

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 serviceability serviceability-dev@openjdk.org label May 28, 2024
@mlbridge
Copy link

mlbridge bot commented May 28, 2024

Webrevs

Copy link
Contributor

@plummercj plummercj left a comment

Choose a reason for hiding this comment

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

I verified that debuggee process is killed before test finishes. (Just by printing it's status.)

What about when the test fails?

}

int code = debuggee.waitFor();
if (code != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do the other tests check for Consts.JCK_STATUS_BASE, but here we check for 0?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a vm exit command test.
The test explicitly calls
' vm.exit(0);'
in line 157. So exit code is 0 and not "standard" 95.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 29, 2024
Copy link
Contributor

@sspitsyn sspitsyn 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.

@lmesnik
Copy link
Member Author

lmesnik commented May 30, 2024

/integrate

@openjdk
Copy link

openjdk bot commented May 30, 2024

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

  • 11e926c: 8332777: Update JCStress test suite
  • 44c1845: 8330852: All callers of JvmtiEnvBase::get_threadOop_and_JavaThread should pass current thread explicitly
  • 922e312: 8328611: Thread safety issue in com.sun.tools.jdi.ReferenceTypeImpl::classObject
  • 1d889e5: 8332487: Regression in Crypto-AESGCMBench.encrypt (and others) after JDK-8328181
  • 32636dc: 8333105: Shenandoah: Results of concurrent mark may be lost for degenerated cycle
  • 7071542: 8331189: Implementation of Scoped Values (Third Preview)
  • 4acafb8: 8333107: javac fails with an exception when processing broken lambda
  • 921860d: 8333264: Remove unused resolve_sub_helper declaration after JDK-8322630
  • 4a20691: 8331876: JFR: Move file read and write events to java.base
  • f608918: 8332614: Type-checked ConstantPool.entryByIndex and ClassReader.readEntryOrNull
  • ... and 69 more: https://git.openjdk.org/jdk/compare/b3b33667ad3bdb7be868fb165a1ea53054947cd0...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented May 30, 2024

@lmesnik Pushed as commit b3e29db.

💡 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

integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

3 participants