Skip to content
This repository has been archived by the owner. It is now read-only.

8256843: [PPC64] runtime/logging/RedefineClasses.java fails with assert: registers not saved on stack #24

Closed
wants to merge 1 commit into from
Closed

8256843: [PPC64] runtime/logging/RedefineClasses.java fails with assert: registers not saved on stack #24

wants to merge 1 commit into from

Conversation

@reinrich
Copy link
Contributor

@reinrich reinrich commented Dec 15, 2020

// Continuation of openjdk/jdk#1724
// I'm taking over from @TheRealMDoerr who's busy with 11u downports

Please help review this small PPC64 fix.
It replaces the call os::current_stack_pointer() in os::current_frame()
with __builtin_frame_address(0) which is available also with xlC used by the AIX
build. With this os::current_frame() is agnostic to C++ compiler inlining.

Furthermore the fix changes os::current_frame() to return the correct
frame. Without the fix the returned frame is one frame to high which triggered
the assertion in trace_method_handle_stub().
This change uncovers an issue with NativeCallStack::NativeCallStack(int toSkip, bool fillStack)
on PPC64. There the call os::get_native_stack() is not compiled
to a tail call therefore the frame of the NativeCallStack constructor needs to
be skipped on PPC64 too as on other platforms.

Without this

make run-test TEST=test/hotspot/jtreg/runtime/NMT/CheckForProperDetailStackTrace.java

fails.

Furthermore the inline assembler from os::current_stack_pointer() is
removed. Instead __builtin_frame_address(0) is used again.

The fix passed our CI testing: JCK and JTREG, also in Xcomp mode, SPECjvm2008, SPECjbb2015, Renaissance Suite,
SAP specific tests with fastdebug and release builds on all platforms


Progress

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

Issue

  • JDK-8256843: [PPC64] runtime/logging/RedefineClasses.java fails with assert: registers not saved on stack

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk16 pull/24/head:pull/24
$ git checkout pull/24

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Dec 15, 2020

👋 Welcome back rrich! 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 openjdk bot commented Dec 15, 2020

@reinrich 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 Dec 15, 2020
@reinrich reinrich marked this pull request as ready for review Dec 16, 2020
@openjdk openjdk bot added the rfr label Dec 16, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Dec 16, 2020

Webrevs

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Thank you for fixing it in jdk16 as discussed in the jdk PR!
Note that PR and JBS title must match, otherwise integration is blocked.

@reinrich reinrich changed the title 8256843: [PPC64] test RedefineClasses.java fails with assert: registers not saved on stack 8256843: [PPC64] runtime/logging/RedefineClasses.java fails with assert: registers not saved on stack Dec 16, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Dec 16, 2020

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

8256843: [PPC64] runtime/logging/RedefineClasses.java fails with assert: registers not saved on stack

Reviewed-by: mdoerr, lucy

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

  • 952dc70: 8257636: Update usage of "type" terminology in java.lang.Class and java.lang.reflect
  • 04a1e5b: 8258505: [TESTBUG] TestDivZeroWithSplitIf.java fails due to missing UnlockDiagnosticVMOptions
  • 41f312e: 8254023: A module declaration is not allowed to be a target of an annotation that lacks an @target meta-annotation
  • ce0ab2d: 8258338: Support deprecated records
  • 6b4b676: 8241353: NPE in ToolProvider.getSystemJavaCompiler
  • 87644a2: 8255880: UI of Swing components is not redrawn after their internal state changed
  • 72dfba8: 8257637: Update usage of "type" terminology in java.lang.annotation
  • b5a3a5b: 8258236: Segfault in ClassListParser::resolve_indy dumping static AppCDS archive
  • b97fe6c: 8258419: RSA cipher buffer cleanup
  • 1f556d2: 8258380: [JVMCI] don't clear InstalledCode reference when unloading JVMCI nmethods
  • ... and 5 more: https://git.openjdk.java.net/jdk16/compare/09e8675f568571d959d55b096c2cd3b033204e62...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 Dec 16, 2020
@reinrich
Copy link
Contributor Author

@reinrich reinrich commented Dec 16, 2020

Thank you for fixing it in jdk16 as discussed in the jdk PR!

Thanks for the review!

Note that PR and JBS title must match, otherwise integration is blocked.

Mon dieu! I corrected the PR title :)

Copy link

@RealLucy RealLucy left a comment

Changes look good. Thanks for fixing.

Side note (not relevant for approval): Wouldn't it be nice to use the builtin just once and call os::current_stack_pointer() in os::current_frame()?

@reinrich
Copy link
Contributor Author

@reinrich reinrich commented Dec 17, 2020

Changes look good. Thanks for fixing.

Thanks for the review!

Side note (not relevant for approval): Wouldn't it be nice to use the builtin just once and call os::current_stack_pointer() in os::current_frame()?

Yeah this would be nice but then we would be dependent to call inlining by the C++ compiler, i.e. we'd have to fiddle around with NMT_NOINLINE again (btw: we could do the same on s390 where NMT_NOINLINE is used)

@reinrich
Copy link
Contributor Author

@reinrich reinrich commented Dec 18, 2020

Thanks again for the reviews @TheRealMDoerr, @RealLucy!

/integrate

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

@openjdk openjdk bot commented Dec 18, 2020

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

  • 45a150b: 8258134: assert(size == calc_size) failed: incorrect size calculation on x86_32 with AVX512 machines
  • 38593a4: 8257974: Regression 21% in DaCapo-lusearch-large after JDK-8236926
  • 7afb01d: 8258373: Update the text handling in the JPasswordField
  • cbc3fee: 8258259: Unicode linebreak matching behavior is incorrect; backout JDK-8235812
  • 7320e05: 8258647: TestCharVect2 is very slow
  • 9fdfc6d: 8225072: Add LuxTrust certificate that is expiring in March 2021 to list of allowed but expired certs
  • 30ca0a5: 8247994: Localize javadoc search
  • 47c180d: 8258515: javac should issue an error if an annotation is nested in a local class or interface
  • cb5a6b1: 8258225: compiler/c2/cr6340864/TestIntVect.java runs faster in interpreter
  • 61cbf0f: 8258293: tools/jpackage/share/RuntimePackageTest.java#id0 with RuntimePackageTest.testUsrInstallDir2
  • ... and 17 more: https://git.openjdk.java.net/jdk16/compare/09e8675f568571d959d55b096c2cd3b033204e62...master

Your commit was automatically rebased without conflicts.

Pushed as commit 1ce2e94.

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants