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

8294406: Test runtime/handshake/HandshakeDirectTest.java failed: JVMTI_ERROR_WRONG_PHASE #10502

Closed
wants to merge 1 commit into from

Conversation

lmesnik
Copy link
Member

@lmesnik lmesnik commented Sep 30, 2022


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-8294406: Test runtime/handshake/HandshakeDirectTest.java failed: JVMTI_ERROR_WRONG_PHASE

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10502

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 30, 2022

👋 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 Sep 30, 2022

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

  • hotspot-runtime

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 hotspot-runtime hotspot-runtime-dev@openjdk.org rfr Pull request is ready for review labels Sep 30, 2022
@mlbridge
Copy link

mlbridge bot commented Sep 30, 2022

Webrevs

@lmesnik
Copy link
Member Author

lmesnik commented Sep 30, 2022

/label serviceability

@lmesnik
Copy link
Member Author

lmesnik commented Sep 30, 2022

/cc serviceability

@openjdk openjdk bot added the serviceability serviceability-dev@openjdk.org label Sep 30, 2022
@openjdk
Copy link

openjdk bot commented Sep 30, 2022

@lmesnik
The serviceability label was successfully added.

@openjdk
Copy link

openjdk bot commented Sep 30, 2022

@lmesnik The serviceability label was already applied.

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.

Why is JVMTI_ERROR_WRONG_PHASE a valid result here?

@sspitsyn
Copy link
Contributor

Why is JVMTI_ERROR_WRONG_PHASE a valid result here?

I think, it is because the testing suspendResumeThread tread is a daemon thread.
I'm not sure why it was set to be a daemon thread though.

@robehn
Copy link
Contributor

robehn commented Sep 30, 2022

The reason for it to be a daemon is that this thread should try to suspend/resume when we are terminating, thus trying to hit those rare exit parts where we do thread exits with a pending suspend.

@sspitsyn
Copy link
Contributor

Thanks, Robbin. I see the point.

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 good.
Thanks,
Serguei

@openjdk
Copy link

openjdk bot commented Sep 30, 2022

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

8294406: Test runtime/handshake/HandshakeDirectTest.java failed: JVMTI_ERROR_WRONG_PHASE

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

  • 07ed68e: 8288907: serviceability/jvmti/vthread/SuspendResume1/SuspendResume1.java fails with -XX:TieredStopAtLevel=2,3
  • 090cdfc: 8294726: Update URLs in minefield tests
  • ed40d88: 8276849: Refresh the window icon on graphics configuration changes
  • 081691a: 8294593: Check the size of the target on invocations of BigInteger::isProbablePrime
  • a4f2078: 8294437: java/nio/channels/FileChannel tests slow on Windows
  • c6e3daa: 8242115: C2 SATB barriers are not safepoint-safe
  • e137f9f: 8293877: Rewrite MineField test
  • 4f44fd6: 8237467: jlink plugin to save the argument files as input to jlink in the output image
  • edfb18a: 8294695: Remove redundant deprecation suppression in ThreadGroup
  • 46633e6: 8294698: Remove unused 'checkedExceptions' param from MethodAccessorGenerator.generateMethod()
  • ... and 31 more: https://git.openjdk.org/jdk/compare/a07975bf3e321bdf02748693930c2523fa1df22d...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 ready Pull request is ready to be integrated label Sep 30, 2022
@dholmes-ora
Copy link
Member

So what is the "wrong phase" that we are in? I don't like just accepting any wrong phase because only termination phases are expected to be encountered not startup phases.

@sspitsyn
Copy link
Contributor

sspitsyn commented Oct 3, 2022

In this particular case the wrong phase that we are in can be only JVMTI_PHASE_DEAD. It can't be any phase before JVMTI_PHASE_LIVE because it happens when we execute a java code. The WRONG_PHASE error code has to be always expected by any tests that use JVM TI.

@dholmes-ora
Copy link
Member

Okay so because this is a daemon thread it can be hit up to when the final termination safepoint is initiated, and this is after the VM is marked as "dead". Thanks.

@lmesnik
Copy link
Member Author

lmesnik commented Oct 4, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Oct 4, 2022

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

  • 4d6668e: 8294242: JFR: jfr print doesn't handle infinite duration well
  • 5a9cd33: 8294509: The sign extension bug applies to 'public static int[] convertSeedBytesToInts(byte[] seed, int n, int z)' in RandomSupport
  • f03934e: 8294578: [PPC64] C2: Missing is_oop information when using disjoint compressed oops mode
  • 3b476a1: 8292847: Zero: Allow ergonomics to select the GC
  • 16047e8: 8292780: misc tests failed "assert(false) failed: graph should be schedulable"
  • bf39b18: 8288302: Shenandoah: SIGSEGV in vm maybe related to jit compiling xerces
  • f957ce9: 8294564: IGV: IllegalArgumentException for "Difference to current graph"
  • ae79af2: 8294740: Add cgroups keyword to TestDockerBasic.java
  • 07ed68e: 8288907: serviceability/jvmti/vthread/SuspendResume1/SuspendResume1.java fails with -XX:TieredStopAtLevel=2,3
  • 090cdfc: 8294726: Update URLs in minefield tests
  • ... and 39 more: https://git.openjdk.org/jdk/compare/a07975bf3e321bdf02748693930c2523fa1df22d...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 4, 2022

@lmesnik Pushed as commit 2dbedf0.

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

@lmesnik lmesnik deleted the 8294406 branch June 5, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

4 participants