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

8268033: compiler/intrinsics/bmi/verifycode/BzhiTestI2L.java fails with "fatal error: Not compilable at tier 3: CodeBuffer overflow" #7214

Closed
wants to merge 2 commits into from

Conversation

eme64
Copy link
Contributor

@eme64 eme64 commented Jan 25, 2022

…th "fatal error: Not compilable at tier 3: CodeBuffer overflow"

Problem:
When BzhiTestI2L.java is compiled with flag -Xcomp and -XX:+VerifyOops, it happens that also sun.security.util.KnownOIDs::<clinit> is compiled. This class is an enum with many string values. This generates a rather large code size for the <clinit> method. The additional code for verifying oops pushes it over the CodeBuffer limit (NMethodSizeLimit). Because of the overflow, the compilation hits a bailout. Because of -XX:+AbortVMOnCompilationFailure this aborts the test, it fails.

Analysis:
We can not control the size of library classes/enums, and the size of the generated code from the respective <clinit>.
-Xcomp and -XX:+VerifyOops are helpful flags for tests in general.
However, it does not make sense to require all methods to be compiled.

Solution:
Restrict compilation to the relevant classes in the test files.
Removed test from test/hotspot/jtreg/ProblemList-Xcomp.txt (List of quarantined tests for testing in Xcomp mode).

Alternative Solutions:

  1. Increase NMethodSizeLimit. The concrete value would be arbitrary, and if any class/enum exceeds it in the future, this same test bug reappears.
  2. Drop -XX:+AbortVMOnCompilationFailure. This would accept bailouts, and the test would pass despite bailouts. This helps with the current testing bug. But in the future, unexpected bailouts would not be detected. This is problematic, because the test compiles code with the WhiteBox API, to check if it compiles correctly. Thus, bailouts are an important sign that something might have gone wrong.

The Test now passes (initialized with the same parameters as reported in issue).


Progress

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

Issue

  • JDK-8268033: compiler/intrinsics/bmi/verifycode/BzhiTestI2L.java fails with "fatal error: Not compilable at tier 3: CodeBuffer overflow"

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 7214

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

Using diff file

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

…th "fatal error: Not compilable at tier 3: CodeBuffer overflow"
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 25, 2022

👋 Welcome back eme64! 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 8268033: compiler/intrinsics/bmi/verifycode/BzhiTestI2L.java fails wi… 8268033: compiler/intrinsics/bmi/verifycode/BzhiTestI2L.java fails with "fatal error: Not compilable at tier 3: CodeBuffer overflow" Jan 25, 2022
@openjdk
Copy link

openjdk bot commented Jan 25, 2022

@eme64 The following label will be automatically applied to this pull request:

  • hotspot-compiler

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-compiler hotspot-compiler-dev@openjdk.org label Jan 25, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 25, 2022
@mlbridge
Copy link

mlbridge bot commented Jan 25, 2022

Webrevs

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Good.

@openjdk
Copy link

openjdk bot commented Jan 25, 2022

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

8268033: compiler/intrinsics/bmi/verifycode/BzhiTestI2L.java fails with "fatal error: Not compilable at tier 3: CodeBuffer overflow"

Reviewed-by: kvn, neliasso, chagedorn

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

  • c180070: 8280373: Update Xalan serializer / SystemIDResolver to align with JDK-8270492
  • a24f44d: 8280526: x86_32 Math.sqrt performance regression with -XX:UseSSE={0,1}
  • e72eefd: 8280531: Remove unused DeferredCloseInputStream
  • 2c64a7f: 8280374: G1: Remove unnecessary prev bitmap mark
  • a183bfb: 8280377: MethodHandleProxies does not correctly invoke default methods with varags
  • 2eab86b: 8213905: reflection not working for type annotations applied to exception types in the inner class constructor
  • 295c047: 8279242: Reflection newInstance() error message when constructor has no access modifiers could use improvement
  • 841eae6: 8269542: JDWP: EnableCollection support is no longer spec compliant after JDK-8255987
  • 76fe03f: 8280166: Extend java/lang/instrument/GetObjectSizeIntrinsicsTest.java test cases
  • cebaad1: 8280041: Retry loop issues in java.io.ClassCache
  • ... and 117 more: https://git.openjdk.java.net/jdk/compare/cc2f474c18082413420b353528198883055de73a...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@vnkozlov, @neliasso, @chhagedorn) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 25, 2022
Copy link

@neliasso neliasso left a comment

Choose a reason for hiding this comment

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

Looks good

@eme64
Copy link
Contributor Author

eme64 commented Jan 26, 2022

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jan 26, 2022
@openjdk
Copy link

openjdk bot commented Jan 26, 2022

@eme64
Your change (at version b56b5b2) is now ready to be sponsored by a Committer.

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

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

Nice analysis! Looks good and trivial.

@chhagedorn
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Jan 26, 2022

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

  • c180070: 8280373: Update Xalan serializer / SystemIDResolver to align with JDK-8270492
  • a24f44d: 8280526: x86_32 Math.sqrt performance regression with -XX:UseSSE={0,1}
  • e72eefd: 8280531: Remove unused DeferredCloseInputStream
  • 2c64a7f: 8280374: G1: Remove unnecessary prev bitmap mark
  • a183bfb: 8280377: MethodHandleProxies does not correctly invoke default methods with varags
  • 2eab86b: 8213905: reflection not working for type annotations applied to exception types in the inner class constructor
  • 295c047: 8279242: Reflection newInstance() error message when constructor has no access modifiers could use improvement
  • 841eae6: 8269542: JDWP: EnableCollection support is no longer spec compliant after JDK-8255987
  • 76fe03f: 8280166: Extend java/lang/instrument/GetObjectSizeIntrinsicsTest.java test cases
  • cebaad1: 8280041: Retry loop issues in java.io.ClassCache
  • ... and 117 more: https://git.openjdk.java.net/jdk/compare/cc2f474c18082413420b353528198883055de73a...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 26, 2022

@chhagedorn @eme64 Pushed as commit ed0df2f.

💡 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
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
4 participants