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

8262443: GenerateOopMap::do_interpretation can spin for a long time. #2742

Closed
wants to merge 3 commits into from

Conversation

robehn
Copy link
Contributor

@robehn robehn commented Feb 26, 2021

With Safepoint/Handshake timeout enabled in rare cases this methods spins for a long time, blocking safepoints/handshakes, so timeout (with a long delay) is triggered.

In some cases we are in native while executing this method and in some in vm.
That's why there is an check for state in vm.

Tested with other changes in t-1-7 this specific case of timeout is no longer an issue.
This change-set passes T1 stand alone.


Progress

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

Issue

  • JDK-8262443: GenerateOopMap::do_interpretation can spin for a long time.

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2742/head:pull/2742
$ git checkout pull/2742

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 26, 2021

👋 Welcome back rehn! 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 Feb 26, 2021

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

  • hotspot

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 hotspot hotspot-dev@openjdk.org label Feb 26, 2021
@robehn robehn marked this pull request as ready for review Feb 26, 2021
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 26, 2021
@mlbridge
Copy link

mlbridge bot commented Feb 26, 2021

Webrevs

Copy link
Contributor

@coleenp coleenp left a comment

This seems legit. This can be called by the compiler thread while in native, or during GC or during the rewriter if jsr/ret is found. I assume the last case is what you observed?

@openjdk
Copy link

openjdk bot commented Feb 26, 2021

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

8262443: GenerateOopMap::do_interpretation can spin for a long time.

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

  • eb4a8af: 8260664: Phaser.arrive() memory consistency effects
  • 9221540: 8213269: convert test/hotspot/jtreg/runtime/memory/RunUnitTestsConcurrently to gtest
  • 17853ee: 8263200: Add -XX:StressCCP to CTW
  • a2b8858: 8263041: Shenandoah: Cleanup C1 keep alive barrier check
  • 1f9ed90: 8219555: compiler/jvmci/compilerToVM/IsMatureTest.java fails with Unexpected isMature state for multiple times invoked method: expected false to equal true
  • bf9b74d: 8262446: DragAndDrop hangs on Windows
  • b1cc864: 8251210: Link JDK api docs to other versions
  • 0da889e: 8210100: ParallelGC should use parallel WeakProcessor
  • 679faa6: 8263097: Update JMH devkit to 1.28
  • ab2cfcc: 8252831: Correct "no comment" warnings in jdk.net module
  • ... and 4 more: https://git.openjdk.java.net/jdk/compare/22a3117d229cba10c690a4e66baf9c754a09e57c...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 Feb 26, 2021
Copy link
Member

@dholmes-ora dholmes-ora left a comment

Looks good. Minor request below.

Thanks,
David

src/hotspot/share/oops/generateOopMap.cpp Outdated Show resolved Hide resolved
Copy link
Member

@dcubed-ojdk dcubed-ojdk left a comment

Looks good. Only a couple of minor suggestions.

src/hotspot/share/oops/generateOopMap.cpp Show resolved Hide resolved
src/hotspot/share/oops/generateOopMap.cpp Outdated Show resolved Hide resolved
@robehn
Copy link
Contributor Author

robehn commented Mar 8, 2021

This seems legit. This can be called by the compiler thread while in native, or during GC or during the rewriter if jsr/ret is found. I assume the last case is what you observed?

There are several code paths here, e.g. from has_balanced_monitors() is all those during jsr/ret? I don't know.

@robehn
Copy link
Contributor Author

robehn commented Mar 8, 2021

Thanks for having a look, @coleenp, @dholmes-ora, @dcubed-ojdk.
Waiting for Dan to approve.

coleenp
coleenp approved these changes Mar 8, 2021
Copy link
Contributor

@coleenp coleenp left a comment

Still looks good.

Copy link
Member

@dcubed-ojdk dcubed-ojdk left a comment

Thumbs up!

@robehn
Copy link
Contributor Author

robehn commented Mar 8, 2021

Still looks good.

Thanks!

@robehn
Copy link
Contributor Author

robehn commented Mar 8, 2021

Thumbs up!

Thanks!

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Still good.

@robehn
Copy link
Contributor Author

robehn commented Mar 11, 2021

/integrate

@robehn
Copy link
Contributor Author

robehn commented Mar 11, 2021

Thanks @dholmes-ora, @dcubed-ojdk and @coleenp!

@openjdk openjdk bot closed this Mar 11, 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 Mar 11, 2021
@openjdk
Copy link

openjdk bot commented Mar 11, 2021

@robehn Since your change was applied there have been 52 commits pushed to the master branch:

  • 32cbd19: 8263105: security-libs doclint cleanup
  • 6971c23: 8262351: Extra '0' in java.util.Formatter for '%012a' conversion with a sign character
  • c6d74bd: 8262910: Cleanup THREAD/TRAPS/naming and typing issues in ObjectMonitor and related code
  • 57f16f9: 8262377: Parallel class resolution loses constant pool error
  • b482733: 8259218: (fs) Add links in from overloaded methods in java.nio.file.Files
  • acda812: 8263333: Improve links from core reflection to JLS and JVMS
  • 9399e1b: 8261918: two runtime/cds/appcds/VerifierTest failed with "Unable to use shared archive"
  • 7e52a6e: 8263380: Unintended use of Objects.nonNull in VarHandles
  • 4b5be40: 8238812: assert(false) failed: bad AD file
  • b2a2ddf: 8262438: sun/security/ssl/SSLLogger/LoggingFormatConsistency.java failed with "SocketException: Socket is closed"
  • ... and 42 more: https://git.openjdk.java.net/jdk/compare/22a3117d229cba10c690a4e66baf9c754a09e57c...master

Your commit was automatically rebased without conflicts.

Pushed as commit 7988c1d.

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

@robehn robehn deleted the 8262443-gen-oop-map branch Mar 11, 2021
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
4 participants