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

8351375: nsk/jvmti/ tests should fail when nsk_jvmti_setFailStatus() is called #24040

Closed
wants to merge 5 commits into from

Conversation

lmesnik
Copy link
Member

@lmesnik lmesnik commented Mar 13, 2025

The nsk_jvmti_setFailStatus() sometimes is called after test check results. In these cases the warning logs are generated and hide the real failure reasons. Also, I think it is a error-prone way to set and check error, since check might be just forgotten. Also, the test execution after failure might be incorrect and also make failure analysis harder.
So I think it makes sense to always fail when nsk_jvmti_setFailStatus() is called.

If this is going to work I'll rename it later and add add optional message to be more informative.


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-8351375: nsk/jvmti/ tests should fail when nsk_jvmti_setFailStatus() is called (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24040

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

Using diff file

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

Using Webrev

Link to Webrev Comment

Sorry, something went wrong.

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 13, 2025

👋 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 Mar 13, 2025

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

8351375: nsk/jvmti/ tests should fail when  nsk_jvmti_setFailStatus() is called

Reviewed-by: sspitsyn, cjplummer

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

  • 7442039: 8337279: Share StringBuilder to format instant
  • 22182f7: 8352112: [ubsan] hotspot/share/code/relocInfo.cpp:130:37: runtime error: applying non-zero offset 18446744073709551614 to null pointer
  • c2e14b1: 8343891: Test javax/swing/JTabbedPane/TestJTabbedPaneBackgroundColor.java failed
  • 52c6ce6: 8352091: GenShen: assert(!(request.generation->is_old() && _heap->old_generation()->is_doing_mixed_evacuations())) failed: Old heuristic should not request cycles while it waits for mixed evacuation
  • b8f3856: 8352420: [ubsan] codeBuffer.cpp:984:27: runtime error: applying non-zero offset 18446744073709486080 to null pointer
  • 0cb110e: 8350892: [JVMCI] Align ResolvedJavaType.getInstanceFields with Class.getDeclaredFields
  • 04eac0c: 8352159: RISC-V: add more zfa support
  • ac760dd: 8352423: RISC-V: simplify DivI/L ModI/L
  • d1cf232: 8352248: Check if CMoveX is supported
  • 2b55979: 8352529: RISC-V: enable loopopts tests
  • ... and 170 more: https://git.openjdk.org/jdk/compare/7c9a7840ea75a9a7df3f240d063e9833f535e6ec...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 Mar 13, 2025
@openjdk
Copy link

openjdk bot commented Mar 13, 2025

@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 Mar 13, 2025
@mlbridge
Copy link

mlbridge bot commented Mar 13, 2025

Webrevs

@lmesnik lmesnik changed the title 8351375: nsk/jvmti/ tests should fail when nsk_jvmti_setFailStatus() is called. 8351375: nsk/jvmti/ tests should fail when nsk_jvmti_setFailStatus() is called Mar 13, 2025
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.

The fix looks okay in general. I've posted one comment about typos and one question.

if (phase == JVMTI_PHASE_DEAD) {
NSK_DISPLAY0("CompiledMethodLoad event recieved in dead phase");
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Typos at L148: GetMethodNamme => GetMethodName, is work => works, phasem => phase
A suggestion is to reformulate the comment as below:

    // GetMethodName works in live phase only so just exit if the event is generated too late

Also, I wonder if we want to abort/fail in all cases when phase == JVMTI_PHASE_DEAD.

Copy link
Contributor

@sspitsyn sspitsyn Mar 20, 2025

Choose a reason for hiding this comment

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

Also, I wonder if we want to abort/fail in all cases when phase == JVMTI_PHASE_DEAD.

I take it back. My suggestion does not look right.

Copy link
Member Author

Choose a reason for hiding this comment

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

comment fixed.
I haven't find in spec that event can't be generated in dead phase. So test should just ignore this event.

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.

Looks good.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 20, 2025
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.

Thank you for the update! LGTM.

@lmesnik
Copy link
Member Author

lmesnik commented Mar 22, 2025

/integrate

@openjdk
Copy link

openjdk bot commented Mar 22, 2025

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

  • 7442039: 8337279: Share StringBuilder to format instant
  • 22182f7: 8352112: [ubsan] hotspot/share/code/relocInfo.cpp:130:37: runtime error: applying non-zero offset 18446744073709551614 to null pointer
  • c2e14b1: 8343891: Test javax/swing/JTabbedPane/TestJTabbedPaneBackgroundColor.java failed
  • 52c6ce6: 8352091: GenShen: assert(!(request.generation->is_old() && _heap->old_generation()->is_doing_mixed_evacuations())) failed: Old heuristic should not request cycles while it waits for mixed evacuation
  • b8f3856: 8352420: [ubsan] codeBuffer.cpp:984:27: runtime error: applying non-zero offset 18446744073709486080 to null pointer
  • 0cb110e: 8350892: [JVMCI] Align ResolvedJavaType.getInstanceFields with Class.getDeclaredFields
  • 04eac0c: 8352159: RISC-V: add more zfa support
  • ac760dd: 8352423: RISC-V: simplify DivI/L ModI/L
  • d1cf232: 8352248: Check if CMoveX is supported
  • 2b55979: 8352529: RISC-V: enable loopopts tests
  • ... and 170 more: https://git.openjdk.org/jdk/compare/7c9a7840ea75a9a7df3f240d063e9833f535e6ec...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 22, 2025

@lmesnik Pushed as commit 334a1ee.

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

@dholmes-ora
Copy link
Member

There are a number of tier 5 failures after this change - filed JDK-8352652

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.

None yet

4 participants