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

8266453: Shenandoah: Disable write protections before patching nmethod in nmethod_barrier on MacOSX/AArch64 #3843

Closed
wants to merge 1 commit into from

Conversation

@zhengyu123
Copy link
Contributor

@zhengyu123 zhengyu123 commented May 3, 2021

Some of tier1/tier2 tests failed on MacOSX/AArch64. The fix is similar to what JDK-8265984 does for ZGC, that disable write protections when patching code.

Test:
tier1 and tier2 with Shenandoah GC on MacOSX/AArch64


Progress

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

Issue

  • JDK-8266453: Shenandoah: Disable write protections before patching nmethod in nmethod_barrier on MacOSX/AArch64

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3843

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented May 3, 2021

👋 Welcome back zgu! 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 May 3, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 3, 2021

@zhengyu123 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.

@mlbridge
Copy link

@mlbridge mlbridge bot commented May 3, 2021

Webrevs

@rkennke
Copy link
Contributor

@rkennke rkennke commented May 3, 2021

Err, what does it do?
I'd prefer if the commit message describes what the fix does, not what the failure is.

@zhengyu123
Copy link
Contributor Author

@zhengyu123 zhengyu123 commented May 3, 2021

Err, what does it do?
I'd prefer if the commit message describes what the fix does, not what the failure is.

Added line disables write protections, before nmethod barrier can patch nmethod code (see https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon for details)

@theRealAph
Copy link
Contributor

@theRealAph theRealAph commented May 4, 2021

Err, what does it do?
I'd prefer if the commit message describes what the fix does, not what the failure is.

Added line disables write protections, before nmethod barrier can patch nmethod code (see https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon for details)

So you need to change the title of this PR.

@zhengyu123 zhengyu123 changed the title 8266453: Shenandoah: Some tests failed on MacOSX/AArch64 8266453: Shenandoah: Disable write protections before patching nmethod in nmethod_barrier on MacOSX/AArch64 May 4, 2021
rkennke
rkennke approved these changes May 5, 2021
Copy link
Contributor

@rkennke rkennke left a comment

Thanks, looks good!

@openjdk
Copy link

@openjdk openjdk bot commented May 5, 2021

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

8266453: Shenandoah: Disable write protections before patching nmethod in nmethod_barrier on MacOSX/AArch64

Reviewed-by: rkennke

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

  • 6ba911d: 8266498: Make debug ps() call print_stack
  • ef0f693: 8266499: Delete dead code in aarch64.ad
  • 71d0858: 8266522: Shenandoah: Shenandoah LRB calls wrong runtime barrier on aarch64
  • 0ac84d1: 8266506: [aix] Treat mapping attempt too close to BRK as a mapping error
  • 02cdd6e: 8266419: [aix] in mmap mode, os::attempt_reserve_memory_at() fails to handle wrong mapping address
  • 250b45a: 8266222: [aix] In mmap-mode, partial releases with os::release_memory may trash internal bookkeeping
  • 65ce4d2: 8266491: Remove resolve and obj_equals leftovers from BarrierSetAssembler
  • a8046c9: 8266436: Synthetic constructor trees have non-null return type
  • c9873c4: 8260621: (jrtfs) ThreadLocal memory leak in ImageBufferCache when using jrtfs
  • 82768d9: 8221503: vmTestbase/nsk/jdb/eval/eval001/eval001.java fails with: com.sun.jdi.InvalidTypeException: Can't assign double[][][] to double[][][]
  • ... and 27 more: https://git.openjdk.java.net/jdk/compare/55cc0af40444262d0ba0f7dc01da44f1a431dc48...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 May 5, 2021
@zhengyu123
Copy link
Contributor Author

@zhengyu123 zhengyu123 commented May 5, 2021

/integrate

@openjdk openjdk bot closed this May 5, 2021
@openjdk openjdk bot added integrated and removed ready labels May 5, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 5, 2021

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

  • a05e8e2: 8266497: Remove unnecessary EMCP liveness indication
  • 6ba911d: 8266498: Make debug ps() call print_stack
  • ef0f693: 8266499: Delete dead code in aarch64.ad
  • 71d0858: 8266522: Shenandoah: Shenandoah LRB calls wrong runtime barrier on aarch64
  • 0ac84d1: 8266506: [aix] Treat mapping attempt too close to BRK as a mapping error
  • 02cdd6e: 8266419: [aix] in mmap mode, os::attempt_reserve_memory_at() fails to handle wrong mapping address
  • 250b45a: 8266222: [aix] In mmap-mode, partial releases with os::release_memory may trash internal bookkeeping
  • 65ce4d2: 8266491: Remove resolve and obj_equals leftovers from BarrierSetAssembler
  • a8046c9: 8266436: Synthetic constructor trees have non-null return type
  • c9873c4: 8260621: (jrtfs) ThreadLocal memory leak in ImageBufferCache when using jrtfs
  • ... and 28 more: https://git.openjdk.java.net/jdk/compare/55cc0af40444262d0ba0f7dc01da44f1a431dc48...master

Your commit was automatically rebased without conflicts.

Pushed as commit 61bb6ec.

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

@openjdk openjdk bot removed the rfr label May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants