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

8258134: assert(size == calc_size) failed: incorrect size calculation on x86_32 with AVX512 machines #21

Closed
wants to merge 1 commit into from

Conversation

@DamonFool
Copy link
Member

@DamonFool DamonFool commented Dec 15, 2020

Hi all,

Two vector api tests crashed on x86_32 with AVX512 machines due to this assert [1].
The reason is that 'calc_size' is incorrect.

But there is no need to calculate 'calc_size' manually at all since the result [2] is actually never used by the VM.
Also, it is really hard to maintain the calculation logic for various hardwares and configurations.
And it may be easily broken again in the future with more and more complicated instructions & configurations.

So it would be better to remove the calculation and the assert, which is safe and already done for x86_64 [3].
The fix follows what is done for x86_64.
And it also makes vec_stack_to_stack_helper, vec_mov_helper and vec_spill_helper return void according to @neliasso 's comments [4].

Thanks.
Best regards,
Jie

[1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86_32.ad#L1016
[2] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86_32.ad#L1059
[3] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86_64.ad#L1042
[4] openjdk/jdk#1753 (comment)


Progress

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

Issue

  • JDK-8258134: assert(size == calc_size) failed: incorrect size calculation on x86_32 with AVX512 machines

Reviewers

Download

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

@DamonFool
Copy link
Member Author

@DamonFool DamonFool commented Dec 15, 2020

/issue add JDK-8258134
/test
/label add hotspot-compiler
/cc hotspot-compiler

Loading

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Dec 15, 2020

👋 Welcome back jiefu! 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.

Loading

@openjdk openjdk bot added the rfr label Dec 15, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Dec 15, 2020

@DamonFool This issue is referenced in the PR title - it will now be updated.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Dec 15, 2020

@DamonFool
The hotspot-compiler label was successfully added.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Dec 15, 2020

@DamonFool The hotspot-compiler label was already applied.

Loading

@mlbridge
Copy link

@mlbridge mlbridge bot commented Dec 15, 2020

Webrevs

Loading

@DamonFool
Copy link
Member Author

@DamonFool DamonFool commented Dec 15, 2020

/test

Loading

@DamonFool
Copy link
Member Author

@DamonFool DamonFool commented Dec 15, 2020

Testing:

  • tier1~tier3 on Linux/x86_{32, 64}, no regression

Loading

Copy link

@vnkozlov vnkozlov left a comment

Good.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Dec 15, 2020

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

8258134: assert(size == calc_size) failed: incorrect size calculation on x86_32 with AVX512 machines

Reviewed-by: kvn, thartmann

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

  • 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
  • 7aac4dc: 8257621: JFR StringPool misses cached items across consecutive recordings
  • ... and 17 more: https://git.openjdk.java.net/jdk16/compare/afc44414d551d9fc342a733651777227f2f95eac...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.

Loading

@openjdk openjdk bot added the ready label Dec 15, 2020
@DamonFool
Copy link
Member Author

@DamonFool DamonFool commented Dec 16, 2020

Thanks @vnkozlov for your review.

@neliasso , are you also OK with this change?
Thanks.

Loading

@DamonFool
Copy link
Member Author

@DamonFool DamonFool commented Dec 17, 2020

May I get a second review for this fix?
Thanks.

Loading

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Looks good.

Loading

@DamonFool
Copy link
Member Author

@DamonFool DamonFool commented Dec 18, 2020

Thanks @TobiHartmann for your review.
/integrate

Loading

@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

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

  • 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
  • 7aac4dc: 8257621: JFR StringPool misses cached items across consecutive recordings
  • ... and 17 more: https://git.openjdk.java.net/jdk16/compare/afc44414d551d9fc342a733651777227f2f95eac...master

Your commit was automatically rebased without conflicts.

Pushed as commit 45a150b.

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

Loading

@DamonFool DamonFool deleted the JDK-8258134 branch Dec 18, 2020
@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Dec 18, 2020

This breaks the build for JDK 16 on Windows.

I see that the pre-submit tests were not run on this pull request. See the following information comment from the Skara bot in the checks section for more information.

Loading

@TobiHartmann
Copy link
Member

@TobiHartmann TobiHartmann commented Dec 18, 2020

This breaks the build for JDK 16 on Windows.

I see that the pre-submit tests were not run on this pull request. See the following information comment from the Skara bot in the checks section for more information.

I've filed JDK-8258688.

Loading

@TobiHartmann
Copy link
Member

@TobiHartmann TobiHartmann commented Dec 18, 2020

Okay, JDK-8258687 has already been filed for this.

Loading

@DamonFool
Copy link
Member Author

@DamonFool DamonFool commented Dec 18, 2020

Okay, I'll have a look. Sorry for this bug.

Loading

@TobiHartmann
Copy link
Member

@TobiHartmann TobiHartmann commented Dec 18, 2020

The problem is that extern int vec_spill_helper has still int in the signature.

Loading

@DamonFool
Copy link
Member Author

@DamonFool DamonFool commented Dec 18, 2020

The problem is that extern int vec_spill_helper has still int in the signature.

Thanks @TobiHartmann for your help.
#51

I didn't know why the build tests were skipped for both pull/21 and pull/51.

Loading

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Dec 18, 2020

I didn't know why the build tests were skipped for both pull/21 and pull/51.

You need to enable the GitHub actions to run on your repo. If you go to the checks link I added above, you will see:

In order to run pre-submit tests, the source repository must be properly configured to allow test execution. See https://wiki.openjdk.java.net/display/SKARA/Testing for more information on how to configure this.

Loading

@DamonFool
Copy link
Member Author

@DamonFool DamonFool commented Dec 18, 2020

I didn't know why the build tests were skipped for both pull/21 and pull/51.

You need to enable the GitHub actions to run on your repo. If you go to the checks link I added above, you will see:

In order to run pre-submit tests, the source repository must be properly configured to allow test execution. See https://wiki.openjdk.java.net/display/SKARA/Testing for more information on how to configure this.

OK.
Thanks for your guidance.
I'll fix it next time.

Loading

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