8379913: [lworld] AppCDS test asserts with -Xcomp --enable-preview#2233
8379913: [lworld] AppCDS test asserts with -Xcomp --enable-preview#2233dafedafe wants to merge 10 commits intoopenjdk:lworldfrom
Conversation
|
👋 Welcome back dfenacci! A progress list of the required criteria for merging this PR into |
|
@dafedafe 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: 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 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
|
@vnkozlov I think it would be good if could have a quick look at this. |
Webrevs
|
vnkozlov
left a comment
There was a problem hiding this comment.
The fix is correct. Good work.
We actually disable AOT code generation when VerifyOops is on. It produces a lot of C strings and we have only fixed number of slots (500 in debug VM) to record them.
If you can manually run locally test, please run with -Xlog:aot+codecache+exit=debug it will show (among other things) how many C strings were recorded in AOT cache during -XXAOTMode=record phase:
[3.139s][debug][aot,codecache,exit] Wrote 1 C strings of total length 22
I don't want to hit 500 limit.
|
An other solution would be to disable AOT code generation if VerifyOops is on: |
|
Thank you @vnkozlov! Disabling the AOT seems actually a more sensible solution (even though my tests showed just a few C strings recorded) but I've only added the disabling of the adapter part ( |
TobiHartmann
left a comment
There was a problem hiding this comment.
That looks like a reasonable fix to me but it's only needed when preview is enabled, right?
Yep, more precisely only when |
|
Thank you @vnkozlov @TobiHartmann for your reviews. |
|
/integrate |
|
Going to push as commit f12276a.
Your commit was automatically rebased without conflicts. |
Issue
Many AppCDS test asserts with
assert(false) failed: Address 0x00007f0dfc2923e0 for <unknown>/('verify_oop: r11: broken oop oop_result, "broken oop in call_VM_base" (src/hotspot/cpu/x86/macroAssembler_x86.cpp:1353)') is missing in AOT Code Cache addresses tablewhen run with-Xcomp --enable-previewCause
The crash happens during AOT cache dumping seemingly because
-XX:+VerifyOopscauses the adapter to use addresses that the AOT doesn't know about. In particular,verify_oop/verify_oop_addradd a message C‑string and reference the verify‑oop stub entry.AOTCodeCache::write_relocations()tries to serialize those relocations,AOTCodeAddressTable::id_for_address()can’t resolve them and crashes.In this case the issue happens with
--enable-previewbecause it creates an adapter for scalarized arguments and, after creating the oop from the arguments,get_vm_result_oopinvokesverify_oop_msg. Without--enable-previewthe path is never taken and the missing "registration" isn’t exercised (I fear that this crash could potentially be triggered by some other (non preview) code but the fix doesn't need to distinguish between preview/non-preview).Fix
Instead of making the two addresses used by
verify_oop_msg"visible" to AOT we disable AOT code generation if both VerifyOops and InlineTypePassFieldsAsArgs are true.Testing
Tier 1-3+
Failing CDS tests before and after
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/2233/head:pull/2233$ git checkout pull/2233Update a local copy of the PR:
$ git checkout pull/2233$ git pull https://git.openjdk.org/valhalla.git pull/2233/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2233View PR using the GUI difftool:
$ git pr show -t 2233Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/2233.diff
Using Webrev
Link to Webrev Comment