Navigation Menu

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

8267972: Inline cache cleaning is not monotonic #4361

Closed

Conversation

fisk
Copy link
Contributor

@fisk fisk commented Jun 4, 2021

When inline cache cleaning of a concurrent code cache unloading cycle happens concurrent to a mutator installing values into an inline cache, the mutator has to be careful not to undo the cleaning performed by a GC thread. Otherwise the GC can clean an inline cache that points at an is_unloading() nmethod, and then the mutator installs a reference back to an is_unloading() nmethod. Then despite the GC having traversed the code cache cleaning up inline caches, we can not be certain that there are no longer inline caches pointing at is_unloading() nmethods.
The fix is relatively simple: when computing the entry for inline caches and static calls, we today check that the target nmethod is_in_use(). We have to check that it is_in_use() && !is_unloading(), to install such code pointers, for completeness.
Testing: tier1-7 tests


Progress

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

Issue

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4361

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 4, 2021

👋 Welcome back eosterlund! 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 openjdk bot added the rfr Pull request is ready for review label Jun 4, 2021
@openjdk
Copy link

openjdk bot commented Jun 4, 2021

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

  • hotspot-compiler

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-compiler hotspot-compiler-dev@openjdk.org label Jun 4, 2021
@mlbridge
Copy link

mlbridge bot commented Jun 4, 2021

Webrevs

Copy link

@iwanowww iwanowww 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
Copy link

openjdk bot commented Jun 4, 2021

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

8267972: Inline cache cleaning is not monotonic

Reviewed-by: vlivanov, kvn

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

  • 64ec8b3: 8212155: Race condition when posting dynamic_code_generated event leads to JVM crash
  • cd0678f: 8199318: add idempotent copy operation for Map.Entry
  • b27599b: 8268222: javax/xml/jaxp/unittest/transform/Bug6216226Test.java failed, cannot delete file
  • 59a539f: 8268129: LibraryLookup::ofDefault leaks symbols from loaded libraries
  • 40c9e25: 8265444: Javadocs: jdk.jshell - small typo
  • 069f180: 8268174: Move x86-specific stub declarations into stubRoutines_x86.hpp
  • 3025f05: 8264305: Create implementation for native accessibility peer for Statusbar java role
  • e2d5ff9: 8268214: Use system zlib and disable dtrace when building linux-aarch64 at Oracle
  • 1b4378e: 8268142: Switch to jdk-17+24 for macosx-aarch64 at Oracle
  • edca245: 8267917: mark hotspot containers tests which ignore external VM flags
  • ... and 18 more: https://git.openjdk.java.net/jdk/compare/1296a6c425e22e0fdc748a996b886923c602ab3f...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 Jun 4, 2021
@fisk
Copy link
Contributor Author

fisk commented Jun 4, 2021

Looks good.

Thanks for the review!

@fisk
Copy link
Contributor Author

fisk commented Jun 7, 2021

Thanks for the review Vladimir K.

@fisk
Copy link
Contributor Author

fisk commented Jun 7, 2021

/integrate

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

openjdk bot commented Jun 7, 2021

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

  • 6d1f3ac: 8149138: [javadoc] Fix SerialFormBuilder eliminate String bashing
  • 58bdabc: 8268164: Adopt cast notation for WorkerThread conversions
  • 9fc914b: 8204686: Dynamic parallel reference processing support for Parallel GC
  • 908aca2: 8262891: Compiler implementation for Pattern Matching for switch (Preview)
  • 3e48244: 8268301: Closed test: compiler/c2/6371167/Test.java fails after JDK-8267904
  • 204b492: 8267703: runtime/cds/appcds/cacheObject/HeapFragmentationTest.java crashed with OutOfMemory
  • 2aeeeb4: 8268279: gc/shenandoah/compiler/TestLinkToNativeRBP.java fails after LibraryLookup is gone
  • b05fa02: 8267904: C2 crash when compile negative Arrays.copyOf length after loop
  • 95ddf7d: 8267839: trivial mem leak in numa
  • 52d88ee: 8268292: compiler/intrinsics/VectorizedMismatchTest.java fails with release VMs
  • ... and 43 more: https://git.openjdk.java.net/jdk/compare/1296a6c425e22e0fdc748a996b886923c602ab3f...master

Your commit was automatically rebased without conflicts.

Pushed as commit 5ebd419.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
3 participants