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

8271490: [ppc] [s390]: Crash in JavaThread::pd_get_top_frame_for_profiling #5071

Closed
wants to merge 1 commit into from

Conversation

RealLucy
Copy link
Contributor

@RealLucy RealLucy commented Aug 10, 2021

Please review this pull request. It hardens the code on ppc and s390 against crashes while collecting stack traces for JFR. Stack frame collection in prims/forte.cpp will benefit from this fix as well as it uses the same platform-specific code.

Testing:
SAP-internal functional and stress testing. Verifying a positive effect is hard because the targeted crashes occur only very rarely. No negative side effects of the fix have been observed.


Progress

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

Issue

  • JDK-8271490: [ppc] [s390]: Crash in JavaThread::pd_get_top_frame_for_profiling

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5071

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Aug 10, 2021

👋 Welcome back lucy! 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 Aug 10, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Aug 10, 2021

@RealLucy 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 label Aug 10, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Aug 10, 2021

Webrevs

@RealLucy
Copy link
Contributor Author

@RealLucy RealLucy commented Aug 10, 2021

The failing Pre-submit tests on Windows x64 are unrelated to this fix. Changes for this fix are in platform-specific files only (os_cpu/linux-ppc, os_cpu/linux-s390, cpu/ppc, cpu/s390). They can't impact Windows x64.

@RealLucy
Copy link
Contributor Author

@RealLucy RealLucy commented Aug 10, 2021

/label add hotspot-jfr

@openjdk
Copy link

@openjdk openjdk bot commented Aug 10, 2021

@RealLucy The label jfr is not a valid label. These labels are valid:

  • serviceability
  • hotspot
  • sound
  • hotspot-compiler
  • ide-support
  • kulla
  • i18n
  • shenandoah
  • jdk
  • javadoc
  • security
  • 2d
  • swing
  • hotspot-runtime
  • jmx
  • nio
  • build
  • beans
  • core-libs
  • compiler
  • net
  • hotspot-gc
  • hotspot-jfr
  • awt

@RealLucy
Copy link
Contributor Author

@RealLucy RealLucy commented Aug 10, 2021

/label add hotspot-jfr

@openjdk openjdk bot added the hotspot-jfr label Aug 10, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Aug 10, 2021

@RealLucy
The hotspot-jfr label was successfully added.

Copy link
Member

@tstuefe tstuefe left a comment

LGTM. Minor comment nits.

// - ret_frame is constructed with _fp == NULL (for whatever reason)
// - ijava_state_unchecked() calculates it's result as
// istate = fp() - z_ijava_state_size() = NULL - 0x68 DEBUG_ONLY(-8)
// - istate->method dereferences memory at offset 8 from istate
Copy link
Member

@tstuefe tstuefe Aug 17, 2021

Choose a reason for hiding this comment

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

I think a reference to the JBS issue would suffice as a comment here.

Copy link
Contributor Author

@RealLucy RealLucy Aug 17, 2021

Choose a reason for hiding this comment

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

Years ago, I was told that direct references to JBS bugs in the code are strongly discouraged. On the other hand, I regard it as very important to have a detailed description available. So what to do? I need a second review anyway. Maybe she has a third opinion on that.

Copy link
Contributor Author

@RealLucy RealLucy Aug 17, 2021

Choose a reason for hiding this comment

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

By the way: Thanks a lot for the review!!!

@openjdk
Copy link

@openjdk openjdk bot commented Aug 17, 2021

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

8271490: [ppc] [s390]: Crash in JavaThread::pd_get_top_frame_for_profiling

Reviewed-by: stuefe, mbaesken

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

  • 9ede41b: 8229031: Exporting CLASSPATH from shell can result in build failures
  • 16e8305: 8273059: Redundant Math.min call in Http2ClientImpl#getConnectionWindowSize
  • f55d5ab: 8272838: Move CriticalJNI tests out of tier1
  • a9188f2: 8268894: forged ASTs can provoke an AIOOBE at com.sun.tools.javac.jvm.ClassWriter::writePosition
  • 1fb798d: 8272915: (doc) package-info typo in extLink
  • 5116784: 8273091: Doc of [Strict]Math.floorDiv(long,int) erroneously documents int in @return tag
  • e66c8af: 8272866: java.util.random package summary contains incorrect mixing function in table
  • d1aeca1: 8272541: Incorrect overflow test in Toom-Cook branch of BigInteger multiplication
  • dfeb413: 8272964: java/nio/file/Files/InterruptCopy.java fails with java.lang.RuntimeException: Copy was not interrupted
  • a033aa5: 8273072: Avoid using += in configure
  • ... and 160 more: https://git.openjdk.java.net/jdk/compare/35b399aca810db63371ff65046f047ef0b955161...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 Aug 17, 2021
@RealLucy
Copy link
Contributor Author

@RealLucy RealLucy commented Aug 30, 2021

Thank you, Matthias, for reviewing and approving this fix. Will integrate now.

@RealLucy
Copy link
Contributor Author

@RealLucy RealLucy commented Aug 30, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Aug 30, 2021

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

  • bb7aa1c: 8272161: Make evacuation failure data structures local to collection
  • 9ede41b: 8229031: Exporting CLASSPATH from shell can result in build failures
  • 16e8305: 8273059: Redundant Math.min call in Http2ClientImpl#getConnectionWindowSize
  • f55d5ab: 8272838: Move CriticalJNI tests out of tier1
  • a9188f2: 8268894: forged ASTs can provoke an AIOOBE at com.sun.tools.javac.jvm.ClassWriter::writePosition
  • 1fb798d: 8272915: (doc) package-info typo in extLink
  • 5116784: 8273091: Doc of [Strict]Math.floorDiv(long,int) erroneously documents int in @return tag
  • e66c8af: 8272866: java.util.random package summary contains incorrect mixing function in table
  • d1aeca1: 8272541: Incorrect overflow test in Toom-Cook branch of BigInteger multiplication
  • dfeb413: 8272964: java/nio/file/Files/InterruptCopy.java fails with java.lang.RuntimeException: Copy was not interrupted
  • ... and 161 more: https://git.openjdk.java.net/jdk/compare/35b399aca810db63371ff65046f047ef0b955161...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Aug 30, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Aug 30, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Aug 30, 2021

@RealLucy Pushed as commit 276b07b.

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

@RealLucy
Copy link
Contributor Author

@RealLucy RealLucy commented Sep 10, 2021

/backport jdk17u

@openjdk
Copy link

@openjdk openjdk bot commented Sep 10, 2021

@RealLucy Unknown command backport - for a list of valid commands use /help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-jfr integrated
3 participants