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

8273895: compiler/ciReplay/TestVMNoCompLevel.java fails due to wrong data size with TieredStopAtLevel=2,3 #5548

Closed
wants to merge 1 commit into from

Conversation

chhagedorn
Copy link
Member

@chhagedorn chhagedorn commented Sep 16, 2021

TestVMNoCompLevel.java is first letting the VM crash with -XX:CICrashAt=1 (method TestMain::test()), then removes the compilation level information from the compile entry in the replay file and then replay compiles with and without tiered compilation. When running the replay file with tiered compilation off, it results in the assertion failure.

When letting the VM crash with -XX:TieredStopAtLevel=2,3 (C1 only), we get a slightly different MDO size for TestMain::test() compared to letting the VM crash with -XX:-TieredCompilation (C2 only). The C1 reported MDO for TestMain::test() is slightly smaller than the C2 MDO. The reason for that can be traced back to JDK-8251462 which changed this code in is_speculative_trap_bytecode(). This now only returns true if C2 is enabled. is_speculative_trap_bytecode() is called when initializing an MDO here:

needs_speculative_traps = needs_speculative_traps || is_speculative_trap_bytecode(c);

If C2 is enabled, then we reserve some extra data space for trap data. But when running with C1 only, this is no longer done since JDK-8251462, so we allocate no extra data space in the MDO for the crashing method TestMain::test().

When now crashing first with -XX:TieredStopAtLevel=2,3, we collect an MDO without the extra trap data for the replay file. But when replay compiling afterwards with -XX:-TieredCompilation, we try to compile it with C2 (we removed the compilation level from the compile entry). We initialize the MDO of TestMain::test() with the extra trap data which is a mismatch to the reported C1 only MDO without extra trap data and we fail with the assertion.

I suggest to just not run this test with -XX:TieredStopAtLevel=2,3 to not try to compile a C1 method with profiling data with C2 in order to avoid this MDO mismatch assertion failure. I'm not sure either of the value of this test as this old format is not created anymore. But we might still want to keep this test around.

Thanks,
Christian


Progress

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

Issue

  • JDK-8273895: compiler/ciReplay/TestVMNoCompLevel.java fails due to wrong data size with TieredStopAtLevel=2,3

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5548

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 16, 2021

👋 Welcome back chagedorn! 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 Pull request is ready for review label Sep 16, 2021
@openjdk
Copy link

openjdk bot commented Sep 16, 2021

@chhagedorn 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 Sep 16, 2021
@mlbridge
Copy link

mlbridge bot commented Sep 16, 2021

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 Sep 16, 2021

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

8273895: compiler/ciReplay/TestVMNoCompLevel.java fails due to wrong data size with TieredStopAtLevel=2,3

Reviewed-by: kvn, dlong

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

  • 8c022e2: 8270434: JDI+UT: Unexpected event in JDI tests
  • b982904: 8271073: Improve testing with VM option VerifyArchivedFields
  • bc48a0a: 8273902: Memory leak in OopStorage due to bug in OopHandle::release()
  • 9c5441c: 8271569: Clean up the use of CDS constants and field offsets
  • 12fa707: 8261941: Use ClassLoader for unregistered classes during -Xshare:dump
  • 7e92abe: 8273710: Remove redundant stream() call before forEach in jdk.jdeps
  • 59b2478: 8273659: Replay compilation crashes with SIGSEGV since 8271911
  • 5e4d09c: 8273300: Check Mutex ranking during a safepoint
  • c86e24d: 8271954: C2: assert(false) failed: Bad graph detected in build_loop_late
  • 14dc517: 8273372: Remove scavenge trace message in psPromotionManager
  • ... and 8 more: https://git.openjdk.java.net/jdk/compare/74ffe12267cb3ae63072a06f50083fd0352d8049...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 Pull request is ready to be integrated label Sep 16, 2021
@chhagedorn
Copy link
Member Author

Thanks Vladimir and Dean for your reviews!

@chhagedorn
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 20, 2021

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

  • d2388b7: 8273959: Some metaspace diagnostic switches should be develop
  • dc7f452: 8273815: move have_special_privileges to os_posix for POSIX platforms
  • 7c9868c: 8273454: C2: Transform (-a)(-b) into ab
  • bb9d142: 8273958: gtest/MetaspaceGtests executes unnecessary tests in debug builds
  • 2a2e919: 8273685: Remove jtreg tag manual=yesno for java/awt/Graphics/LCDTextAndGraphicsState.java & show test instruction
  • 8302061: 8273774: CDSPluginTest should only expect classes_nocoops.jsa exists on supported 64-bit platforms
  • 2f8c221: 8273681: Add Vector API vs Arrays.mismatch intrinsic benchmark
  • 17f7a45: 8273913: Problem list some headful client jtreg tests that fail on macOS 12
  • 27d747a: 8273877: os::unsetenv unused
  • 35f6f1d: 8273808: Cleanup AddFontsToX11FontPath
  • ... and 21 more: https://git.openjdk.java.net/jdk/compare/74ffe12267cb3ae63072a06f50083fd0352d8049...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Sep 20, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 20, 2021
@openjdk
Copy link

openjdk bot commented Sep 20, 2021

@chhagedorn Pushed as commit a561eac.

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

@chhagedorn chhagedorn deleted the JDK-8266895 branch October 1, 2021 07:56
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
Development

Successfully merging this pull request may close these issues.

3 participants