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

8265489: Stress test times out because of long ObjectSynchronizer::monitors_iterate(...) operation #5194

Closed
wants to merge 4 commits into from

Conversation

lmesnik
Copy link
Member

@lmesnik lmesnik commented Aug 19, 2021

monitors_iterate make several checks which often are true before filter monitor by a thread. It might take a lot of time when there are a lot of threads. So it makes sense to first check thread and only then other conditions.


Progress

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

Issue

  • JDK-8265489: Stress test times out because of long ObjectSynchronizer::monitors_iterate(...) operation

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5194

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 19, 2021

👋 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 Aug 19, 2021

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

  • hotspot
  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added serviceability serviceability-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels Aug 19, 2021
if (mid->owner() != thread) {
return;
}
Copy link
Member

Choose a reason for hiding this comment

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

The iter is processing the in-use-list and you're bailing the iteration
when you run into an ObjectMonitor that is not owned by thread, but
that doesn't mean that there's not an ObjectMonitor owned by thread
later on in the in-use-list.

So I could see you doing a continue here, but not a return.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for resolving the above comment.

@lmesnik lmesnik changed the title 8265489: RunThese24H.java times out because of long ObjectSynchronizer::monitors_iterate(...) operation Stress test times out because of long ObjectSynchronizer::monitors_iterate(...) operation Sep 3, 2021
@lmesnik lmesnik changed the title Stress test times out because of long ObjectSynchronizer::monitors_iterate(...) operation 8265489: Stress test times out because of long ObjectSynchronizer::monitors_iterate(...) operation Sep 3, 2021
@lmesnik lmesnik marked this pull request as ready for review September 3, 2021 18:05
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 3, 2021
@mlbridge
Copy link

mlbridge bot commented Sep 3, 2021

Webrevs

Copy link
Member

@dcubed-ojdk dcubed-ojdk left a comment

Choose a reason for hiding this comment

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

Moving the thread check from the closure's do_monitor() call
into monitors_iterate() as early as possible is a good idea.

Do you have any measurements to show how much this helps?
I'm okay if you don't and I'd be happy waiting to see if it makes
a difference with some of those Tier8 timeouts...

@openjdk
Copy link

openjdk bot commented Sep 8, 2021

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

8265489: Stress test times out because of long ObjectSynchronizer::monitors_iterate(...) operation

Reviewed-by: dcubed

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

  • ea4907a: 8273047: test jfr/api/consumer/TestRecordedFrame.java timing out
  • 4eacdb3: 8273104: Refactoring option parser for UL
  • 8884d2f: 8273462: ProblemList vmTestbase/vm/mlvm/anonloader/stress/oome/heap/Test.java in -Xcomp mode
  • d6d6c06: 8273246: Amend the test java/nio/channels/DatagramChannel/ManySourcesAndTargets.java to execute in othervm mode
  • 708407e: 8273168: Remove superfluous use of boxing in java.desktop
  • 270a9d9: 8273043: [TEST_BUG] Automate NimbusJTreeSelTextColor.java
  • df05b4d: 8271923: [macos] the text color on the selected disabled tabbed pane button remains white making text unreadable
  • 2abf3b3: 8271340: Crash PhaseIdealLoop::clone_outer_loop
  • 99fb12c: 8271341: Opcode() != Op_If && Opcode() != Op_RangeCheck) || outcnt() == 2 assert failure with Test7179138_1.java
  • 041ae20: 8268558: [TESTBUG] Case 2 in TestP11KeyFactoryGetRSAKeySpec is skipped
  • ... and 21 more: https://git.openjdk.java.net/jdk/compare/23fa0dcff062803d249c863b90a00744e3477656...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 8, 2021
@lmesnik
Copy link
Member Author

lmesnik commented Sep 8, 2021

I run stress tests several times on linux-x64 with ParallelGC and haven't seen timeout anymore.

@lmesnik
Copy link
Member Author

lmesnik commented Sep 8, 2021

/integrate

@openjdk
Copy link

openjdk bot commented Sep 8, 2021

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

  • 9b5991e: 8273451: Remove unreachable return in mutexLocker::wait
  • e680503: 8273185: Rename the term "atomic" in ReferenceProcessor
  • ba31eee: 8273109: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest times out
  • 4d5e1ed: 8272375: Improve phrasing of synthesized descriptions in JavaFX docs
  • 267c61a: 8273361: InfoOptsTest is failing in tier1
  • f7e9f56: 8273359: CI: ciInstanceKlass::get_canonical_holder() doesn't respect instance size
  • d7efd0e: 8273450: Fix the copyright header of SVML files
  • e5f298a: 8273329: Remove redundant null check from String.getBytes(String charsetName)
  • cb112af: 8269373: some tests in jdk/tools/launcher/ fails on localized Windows platform
  • 7e662e7: 8272413: Incorrect num of element count calculation for vector cast
  • ... and 41 more: https://git.openjdk.java.net/jdk/compare/23fa0dcff062803d249c863b90a00744e3477656...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Sep 8, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 8, 2021
@openjdk
Copy link

openjdk bot commented Sep 8, 2021

@lmesnik Pushed as commit a5e4def.

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

@lmesnik lmesnik deleted the 8265489 branch February 12, 2022 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
2 participants