Skip to content

8332857: Test vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002/TestDescription.java failed#23144

Closed
sspitsyn wants to merge 2 commits intoopenjdk:masterfrom
sspitsyn:c5
Closed

8332857: Test vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002/TestDescription.java failed#23144
sspitsyn wants to merge 2 commits intoopenjdk:masterfrom
sspitsyn:c5

Conversation

@sspitsyn
Copy link
Contributor

@sspitsyn sspitsyn commented Jan 16, 2025

The test lacks a synchronization, so it is added by this fix.

Testing:

  • Ran the failing test vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002
  • TBD: submit mach5 tiers 1-5

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-8332857: Test vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002/TestDescription.java failed (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23144

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 16, 2025

👋 Welcome back sspitsyn! 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 Jan 16, 2025

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

8332857: Test vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002/TestDescription.java failed

Reviewed-by: lmesnik, cjplummer, amenkov

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

  • 17e3df6: 8347763: [doc] Add documentation of module options for JEP 483
  • 6cc1c0a: 8347422: Crash during safepoint handler execution with -XX:+UseAPX
  • baca7da: 8347733: Replace SIZE_FORMAT in runtime code
  • 2ca1b4d: 8347840: Fix testlibrary compilation warnings
  • 2c41f5a: 8347959: ThreadDumper leaks memory
  • 15e06b6: 8345618: javax/swing/text/Caret/8163124/CaretFloatingPointAPITest.java leaves Caret is not complete
  • 3ab521e: 8347924: Replace SIZE_FORMAT in memory and metaspace
  • 8460072: 8342881: RISC-V: secondary_super_cache does not scale well: C1 and interpreter
  • f5573f5: 8330851: C2: More efficient TypeFunc creation
  • a3eef6c: 8346875: Test jdk/jdk/jfr/event/os/TestCPULoad.java fails on macOS
  • ... and 35 more: https://git.openjdk.org/jdk/compare/a3be97e2d61c10f4bf64e9bdb05f562036589765...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 Jan 16, 2025
@openjdk
Copy link

openjdk bot commented Jan 16, 2025

@sspitsyn 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 Jan 16, 2025
@mlbridge
Copy link

mlbridge bot commented Jan 16, 2025

Webrevs

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 16, 2025
/* ============================================================================= */

static jlong timeout = 0;
static jrawMonitorID monitor;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you clarify which data this monitor is protecting? I think it is just prevTestedThreadTime and prevAgentThreadTime, in which case I think you should refine its usage. For example, is it really needed in any of the callbacks other than callbackThreadStart()?

Copy link
Contributor Author

@sspitsyn sspitsyn Jan 17, 2025

Choose a reason for hiding this comment

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

My intention is to serialize event callback calls plus protect multi-threaded access/modification of these variables. It is almost always good to sync the events callbacks. I can add a comment with this clarification.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Jan 17, 2025
Copy link
Member

@lmesnik lmesnik left a comment

Choose a reason for hiding this comment

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

It is a good improvement of test stability. However, I am not sure that it fixed test problem.

Can the test fails because clock on the host were changed? There are some similar test failures happened when host update clock time during test execution.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 17, 2025
@sspitsyn
Copy link
Contributor Author

Alex and Leonid, thank you for review!

@sspitsyn
Copy link
Contributor Author

It is a good improvement of test stability. However, I am not sure that it fixed test problem.

Me neither. This is impossible to reproduce, so at least a lack of synchronization has to be fixed and then see how it goes.
But thank you for the comment!

Can the test fails because clock on the host were changed? There are some similar test failures happened when host update clock time during test execution.

Yes, it can. But we can't say for sure.

@sspitsyn
Copy link
Contributor Author

Thank you for review, Chris!

@sspitsyn
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jan 18, 2025

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

  • 17e3df6: 8347763: [doc] Add documentation of module options for JEP 483
  • 6cc1c0a: 8347422: Crash during safepoint handler execution with -XX:+UseAPX
  • baca7da: 8347733: Replace SIZE_FORMAT in runtime code
  • 2ca1b4d: 8347840: Fix testlibrary compilation warnings
  • 2c41f5a: 8347959: ThreadDumper leaks memory
  • 15e06b6: 8345618: javax/swing/text/Caret/8163124/CaretFloatingPointAPITest.java leaves Caret is not complete
  • 3ab521e: 8347924: Replace SIZE_FORMAT in memory and metaspace
  • 8460072: 8342881: RISC-V: secondary_super_cache does not scale well: C1 and interpreter
  • f5573f5: 8330851: C2: More efficient TypeFunc creation
  • a3eef6c: 8346875: Test jdk/jdk/jfr/event/os/TestCPULoad.java fails on macOS
  • ... and 35 more: https://git.openjdk.org/jdk/compare/a3be97e2d61c10f4bf64e9bdb05f562036589765...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 18, 2025

@sspitsyn Pushed as commit 6ef860c.

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

@dholmes-ora
Copy link
Member

Can the test fails because clock on the host were changed? There are some similar test failures happened when host update clock time during test execution.

There should be nothing in the test that interacts with the time-of-day clock on the host.

@sspitsyn sspitsyn deleted the c5 branch January 30, 2025 09:16
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