Skip to content

8279669: test/jdk/com/sun/jdi/TestScaffold.java uses wrong condition #6652

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

zzambers
Copy link
Contributor

@zzambers zzambers commented Dec 1, 2021

Condition is obviously wrong, because if name starts with "java." other 2 conditions are always true. Intent, as I understand it, was to redefine class where debug event took place (in case of test classes), unless it took place in class of jdk itself, in which case redefine test's main class (if redefineAtEvents is true of course). Check for class names starting with "jdk." was added with later commit [1], not touching that wrong condition (check for classes belonging to jdk) and putting check to else branch instead (therefore not doing any redefinition in case name starts with "jdk.").

Actually fix is done to be then backported to jdk8u, where com/sun/jdi/RedefineCrossEvent.java test stared failing after recent backport [2], due to missing check for classes starting with "jdk." [3]:
...
Redefining class jdk.internal.misc.TerminatingThreadLocal (no class loader)
FAIL: redefine - unexpected exception: java.io.FileNotFoundException: /home/tester/test.1638289866/jdk/JTwork/classes/com/sun/jdi/jdk/internal/misc/TerminatingThreadLocal.class (No such file or directory)
...

This test actually passes for (latest) jdk. However fixing this condition before doing backport, rather than backporting it in current form seems like right thing to do. I tested this locally and jdi tests are passing with this change for latest jdk (and also for jdk8u).

[1] zzambers@4268737#diff-778880449f85966d3c6b219b8ceb41fdbbe7acc5e520d2aa27aada3f33bf1eab
[2] https://bugs.openjdk.java.net/browse/JDK-8273772
[3] https://github.com/openjdk/jdk8u/blob/7d3c0bede34930cadd76644e58bf56f2a83c3d01/jdk/test/com/sun/jdi/TestScaffold.java#L535


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8279669: test/jdk/com/sun/jdi/TestScaffold.java uses wrong condition

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6652/head:pull/6652
$ git checkout pull/6652

Update a local copy of the PR:
$ git checkout pull/6652
$ git pull https://git.openjdk.java.net/jdk pull/6652/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6652

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6652.diff

@bridgekeeper bridgekeeper bot added the oca Needs verification of OCA signatory status label Dec 1, 2021
@bridgekeeper
Copy link

bridgekeeper bot commented Dec 1, 2021

Hi @zzambers, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user zzambers" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@openjdk
Copy link

openjdk bot commented Dec 1, 2021

@zzambers 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 Dec 1, 2021
@jerboaa
Copy link
Contributor

jerboaa commented Dec 2, 2021

/covered

@zzambers works for Red Hat and should be covered by the Red Hat OCA.

@zzambers
Copy link
Contributor Author

zzambers commented Dec 2, 2021

/covered

@bridgekeeper bridgekeeper bot added the oca-verify Needs verification of OCA signatory status label Dec 2, 2021
@bridgekeeper
Copy link

bridgekeeper bot commented Dec 2, 2021

Thank you! Please allow for a few business days to verify that your employer has signed the OCA. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

@bridgekeeper bridgekeeper bot removed oca Needs verification of OCA signatory status oca-verify Needs verification of OCA signatory status labels Dec 6, 2021
@bridgekeeper
Copy link

bridgekeeper bot commented Dec 30, 2021

@zzambers This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@jerboaa
Copy link
Contributor

jerboaa commented Jan 10, 2022

@robilad Could you please OCA check this, please?

@jerboaa
Copy link
Contributor

jerboaa commented Jan 10, 2022

@robilad Could you please OCA check this, please?

err, nvm. I see those labels have been removed. Sorry for the noise.

@jerboaa
Copy link
Contributor

jerboaa commented Jan 10, 2022

@zzambers I've filed https://bugs.openjdk.java.net/browse/JDK-8279669 for this. Please mention it in the PR title so that the bots can properly link the issue. See the jcheck message. Then it should be ready for review.

@zzambers zzambers changed the title test/jdk/com/sun/jdi/TestScaffold.java: Fixed condition 8279669: test/jdk/com/sun/jdi/TestScaffold.java: Fixed condition Jan 10, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 10, 2022
@mlbridge
Copy link

mlbridge bot commented Jan 10, 2022

Webrevs

@jerboaa
Copy link
Contributor

jerboaa commented Jan 10, 2022

@zzambers See the "Integration Blocker" message above. I.e. fix the PR title to match the bug title, thanks.

@zzambers zzambers changed the title 8279669: test/jdk/com/sun/jdi/TestScaffold.java: Fixed condition 8279669: test/jdk/com/sun/jdi/TestScaffold.java uses wrong condition Jan 10, 2022
@openjdk
Copy link

openjdk bot commented Jan 10, 2022

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

8279669: test/jdk/com/sun/jdi/TestScaffold.java uses wrong condition

Reviewed-by: amenkov, 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 444 new commits pushed to the master branch:

  • 2bbeae3: 8279668: x86: AVX2 versions of vpxor should be asserted
  • 3121898: 8279703: G1: Remove unused force_not_compacted local in G1CalculatePointersClosure::do_heap_region
  • bf7bcaa: 8277748: Obsolete the MinInliningThreshold flag in JDK 19
  • 126328c: 8279560: AArch64: generate_compare_long_string_same_encoding and LARGE_LOOP_PREFETCH alignment
  • ec5a455: 8279682: JFR: Remove dead code
  • 6504458: 8279647: JFR: Unclosed directory stream
  • 2f13872: 8279646: JFR: Remove recursive call in jdk.jfr.internal.Control
  • 2f7665b: 8279644: hsdis may not work when it was built with --with-binutils=system
  • 4471e95: 8279645: JFR: The cacheEventType in Dispatcher is never assigned
  • d7e6e9b: 8279643: JFR: Explain why path is sometimes missing from FileRead and FileWrite events
  • ... and 434 more: https://git.openjdk.java.net/jdk/compare/98a9f037397d437d2c3221e8522ed8ab397a457a...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@alexmenkov, @sspitsyn) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 10, 2022
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.

Hi @zzambers,
Thank you for taking care about this!
The fix looks good.
Thanks,
Serguei

@jerboaa
Copy link
Contributor

jerboaa commented Jan 11, 2022

@zzambers please integrate this (see bot comment above) and I'll sponsor the push for you.

@zzambers
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jan 11, 2022
@openjdk
Copy link

openjdk bot commented Jan 11, 2022

@zzambers
Your change (at version e924edb) is now ready to be sponsored by a Committer.

@jerboaa
Copy link
Contributor

jerboaa commented Jan 11, 2022

/sponsor

@openjdk
Copy link

openjdk bot commented Jan 11, 2022

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

  • d46410c: 8279785: JFR: 'jfr configure' should show default values
  • 2bbeae3: 8279668: x86: AVX2 versions of vpxor should be asserted
  • 3121898: 8279703: G1: Remove unused force_not_compacted local in G1CalculatePointersClosure::do_heap_region
  • bf7bcaa: 8277748: Obsolete the MinInliningThreshold flag in JDK 19
  • 126328c: 8279560: AArch64: generate_compare_long_string_same_encoding and LARGE_LOOP_PREFETCH alignment
  • ec5a455: 8279682: JFR: Remove dead code
  • 6504458: 8279647: JFR: Unclosed directory stream
  • 2f13872: 8279646: JFR: Remove recursive call in jdk.jfr.internal.Control
  • 2f7665b: 8279644: hsdis may not work when it was built with --with-binutils=system
  • 4471e95: 8279645: JFR: The cacheEventType in Dispatcher is never assigned
  • ... and 435 more: https://git.openjdk.java.net/jdk/compare/98a9f037397d437d2c3221e8522ed8ab397a457a...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 11, 2022

@jerboaa @zzambers Pushed as commit 4c52eb3.

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

@zzambers
Copy link
Contributor Author

@jerboaa @sspitsyn @alexmenkov thanks for help and reviews

@mrserb
Copy link
Member

mrserb commented Feb 18, 2022

@zzambers do you plan to backport these changes to the old releases and to the jdk8 where this test started to fail?

@zzambers
Copy link
Contributor Author

@mrserb, I have just created jdk8 backport yesterday and I will probably do other ones soon. Sorry for the delay.

@zzambers
Copy link
Contributor Author

/backport jdk17u-dev

@openjdk
Copy link

openjdk bot commented Feb 23, 2022

@zzambers Unknown command backport - for a list of valid commands use /help.

@jerboaa
Copy link
Contributor

jerboaa commented Feb 23, 2022

@zzambers the /backport command works on a commit, not PR. I.e. go to 4c52eb3 and issue the command there.

@zzambers
Copy link
Contributor Author

zzambers commented Feb 23, 2022

@jerboaa thanks, I was wondering why it did not work. But turned out, that I don't have required role for that anyway, so I did it manual way. :)

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.

5 participants