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

8256011: Shenandoah: Don't resurrect finalizably reachable objects #1109

Closed
wants to merge 28 commits into from

Conversation

rkennke
Copy link
Contributor

@rkennke rkennke commented Nov 7, 2020

In the weak-LRB we currently return referents when it is 'marked', that is when it's either reachable strongly or through a finalizable object. This means a finalizable object can be resurrected by Reference.get(), which is wrong. Only truly strongly reachable objects should be returned by Reference.get() during weak-reference-processing.

I had to reconsider the way we call into runtime-LRBs from generated code for these reasons:

  • We need to distinguish phantom, weak and strong reference strength, and native vs in-heap access. Those are two orthogonal dimensions
  • We can have strong and phantom native referents, and strong and weak in-heap referents
  • Native referents are never compressed

Note that this depends on PR#1140.

Testing:

  • hotspot_gc_shenandoah (x86_64, x64_32, aarch64)
  • tier1 +UseShenandoahGC +ShenandoahVerify
  • tier2 +UseShenandoahGC +ShenandoahVerify

Progress

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

Testing

Linux x64 Linux x86 Windows x64 macOS x64
Build ✔️ (5/5 passed) ✔️ (2/2 passed) ✔️ (2/2 passed) ✔️ (2/2 passed)
Test (tier1) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed)

Issue

  • JDK-8256011: Shenandoah: Don't resurrect finalizably reachable objects

Reviewers

Download

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Nov 7, 2020

👋 Welcome back rkennke! 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 label Nov 7, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 7, 2020

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

  • hotspot-gc
  • shenandoah

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 hotspot-gc shenandoah labels Nov 7, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Nov 7, 2020

Copy link
Contributor

@shipilev shipilev left a comment

This makes sense, thanks.

@openjdk
Copy link

@openjdk openjdk bot commented Nov 8, 2020

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

8256011: Shenandoah: Don't resurrect finalizably reachable objects

Reviewed-by: shade, zgu

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

  • 05b8245: 8256290: javac/lambda/T8031967.java fails with StackOverflowError on x86_32
  • c3139ab: 8256220: C1: x86_32 fails with -XX:UseSSE=1 after JDK-8210764 due to mishandled lir_neg
  • 1d3d64f: 8255973: Add more logging to debug JDK-8255917
  • e32a4ea: 8253820: Save test images and dumps with timestamps from client sanity suite
  • dff26a4: 8256063: Module::getPackages on an unnamed module may return packages that are in a named module
  • 531c56e: 8256278: Shenandoah: Avoid num of dead callback from weak processor in Shenandoah root verifier
  • b5a9c92: 8256244: java/lang/ProcessHandle/PermissionTest.java fails with TestNG 7.1
  • 90f9a70: 8255546: Missing coverage for javax.smartcardio.CardPermission and ResponseAPDU
  • 1c0b490: 8256201: java/awt/FullScreen/FullscreenWindowProps/FullscreenWindowProps.java failed
  • 3e70aac: 8254162: Implementation of Foreign-Memory Access API (Third Incubator)
  • ... and 12 more: https://git.openjdk.java.net/jdk/compare/59965c17b40d03bbcbcd15b128f01c00aa6c16de...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 label Nov 8, 2020
Copy link
Contributor

@zhengyu123 zhengyu123 left a comment

Looks good.

@openjdk openjdk bot added hotspot and removed hotspot-gc labels Nov 10, 2020
Copy link
Contributor

@shipilev shipilev left a comment

I have many questions :)

Copy link
Contributor

@shipilev shipilev left a comment

This looks fine to me. Let Zhengyu look through this thoroughly.

Copy link
Contributor

@shipilev shipilev left a comment

This looks fine to me. Good to go, assuming the tests pass.

@openjdk openjdk bot removed ready rfr labels Nov 12, 2020
@openjdk openjdk bot added ready rfr labels Nov 12, 2020
Copy link
Contributor

@shipilev shipilev left a comment

Okay, looks good.

@rkennke
Copy link
Contributor Author

@rkennke rkennke commented Nov 13, 2020

/integrate

@openjdk openjdk bot closed this Nov 13, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels Nov 13, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 13, 2020

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

  • 41139e3: 8255964: Add all details to jstack log in jtreg timeout handler
  • b4d0186: 8253525: Implement getInstanceSize/sizeOf intrinsics
  • ea576dd: 8254887: C2: assert(cl->trip_count() > 0) failed: peeling a fully unrolled loop
  • 05b8245: 8256290: javac/lambda/T8031967.java fails with StackOverflowError on x86_32
  • c3139ab: 8256220: C1: x86_32 fails with -XX:UseSSE=1 after JDK-8210764 due to mishandled lir_neg
  • 1d3d64f: 8255973: Add more logging to debug JDK-8255917
  • e32a4ea: 8253820: Save test images and dumps with timestamps from client sanity suite
  • dff26a4: 8256063: Module::getPackages on an unnamed module may return packages that are in a named module
  • 531c56e: 8256278: Shenandoah: Avoid num of dead callback from weak processor in Shenandoah root verifier
  • b5a9c92: 8256244: java/lang/ProcessHandle/PermissionTest.java fails with TestNG 7.1
  • ... and 15 more: https://git.openjdk.java.net/jdk/compare/59965c17b40d03bbcbcd15b128f01c00aa6c16de...master

Your commit was automatically rebased without conflicts.

Pushed as commit b0c28fa.

💡 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 integrated shenandoah
3 participants