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

8282231: x86-32: runtime call to SharedRuntime::ldiv corrupts registers #1017

Closed
wants to merge 1 commit into from

Conversation

gnu-andrew
Copy link
Member

@gnu-andrew gnu-andrew commented Apr 7, 2022

Same issue with register corruption is present on 11u and causes builds to fail when using GCC 12.

The backport has been in our Fedora RPMs for some time in order to fix this build failure and we've not seen any issues.

Backport was mostly clean, bar the copyright header change.


Progress

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

Issue

  • JDK-8282231: x86-32: runtime call to SharedRuntime::ldiv corrupts registers

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk11u-dev pull/1017/head:pull/1017
$ git checkout pull/1017

Update a local copy of the PR:
$ git checkout pull/1017
$ git pull https://git.openjdk.java.net/jdk11u-dev pull/1017/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1017

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk11u-dev/pull/1017.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 7, 2022

👋 Welcome back andrew! 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 changed the title Backport ecd85e6f0f8906ad1e8aa0a53bf499e8c969ba73 8282231: x86-32: runtime call to SharedRuntime::ldiv corrupts registers Apr 7, 2022
@openjdk
Copy link

openjdk bot commented Apr 7, 2022

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Apr 7, 2022
@mlbridge
Copy link

mlbridge bot commented Apr 7, 2022

Webrevs

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Choose a reason for hiding this comment

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

LGTM.

@openjdk
Copy link

openjdk bot commented Apr 7, 2022

@gnu-andrew This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8282231: x86-32: runtime call to SharedRuntime::ldiv corrupts registers

Reviewed-by: mdoerr

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

  • 5a66c8e: 8283408: Fix a C2 crash when filling arrays with unsafe
  • 5d1718f: 8283451: C2: assert(_base == Long) failed: Not a Long
  • 1f011cb: 8272493: Suboptimal code generation around Preconditions.checkIndex intrinsic with AVX2
  • 6aa09f0: 8282312: Minor corrections to evbroadcasti32x4 intrinsic on x86
  • 3e833fb: 8282172: CompileBroker::log_metaspace_failure is called from non-Java/compiler threads
  • b271964: 8271055: Crash during deoptimization with "assert(bb->is_reachable()) failed: getting result from unreachable basicblock" with -XX:+VerifyStack
  • 67c4882: 8265297: javax/net/ssl/SSLSession/TestEnabledProtocols.java failed with "RuntimeException: java.net.SocketException: Connection reset"
  • 6cc8d69: 8229210: [TESTBUG] Move gc stress tests from JFR directory tree to gc/stress

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 Apr 7, 2022
@GoeLin
Copy link
Member

GoeLin commented Apr 8, 2022

@gnu-andrew, what testing have you done? Are the GHA sufficient to excercise this code?

@gnu-andrew
Copy link
Member Author

@gnu-andrew, what testing have you done? Are the GHA sufficient to excercise this code?

This has been in Fedora for two months now, with each build doing a full bootstrap of the JDK on x86_32.

Without this fix, 11u builds encounter register corruption as the XMM registers are not saved, only CR, CX and BX. javac crashes during build on return from SharedRuntime::ldiv(long long, long long)

The bug has been there a long time. I suspect it has just not been encountered more due to luck than anything else. Newer compilers seem to be exercising the XMM registers more; a similar problem on Windows - https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-October/014379.html - led to their use being turned off.

@gnu-andrew
Copy link
Member Author

I see jdk11u-fix-yes now.

@gnu-andrew
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Apr 17, 2022

Going to push as commit 7b84611.
Since your change was applied there have been 30 commits pushed to the master branch:

  • e6ec27e: 8227171: provide function names in native stack trace on aix with xlc16
  • 8de4b89: 8253797: [cgroups v2] Account for the fact that swap accounting is disabled on some systems
  • 8482b37: 8284756: [11u] Remove unused isUseContainerSupport in CgroupV1Subsystem
  • 1f20c8d: 8281274: deal with ActiveProcessorCount in os::Linux::print_container_info
  • bc28d8f: 8217233: Update build settings for AIX/xlc
  • 24fec25: 8203238: [TESTBUG] rewrite MemOptions shell test in Java
  • f5586d9: 8203239: [TESTBUG] remove vmTestbase/vm/gc/kind/parOld test
  • 3a6dbb4: 8208207: Test nsk/stress/jni/gclocker/gcl001 fails after co-location
  • 684fe80: 8220658: Improve the readability of container information in the error log
  • c38229f: 8284507: GHA: Only check test results if testing was not skipped
  • ... and 20 more: https://git.openjdk.java.net/jdk11u-dev/compare/b6f59f5790c536ae9f3662cdc635a8b5b904348a...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Apr 17, 2022
@openjdk openjdk bot closed this Apr 17, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 17, 2022
@openjdk
Copy link

openjdk bot commented Apr 17, 2022

@gnu-andrew Pushed as commit 7b84611.

💡 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
backport integrated Pull request has been integrated
3 participants