-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8272563: assert(is_double_stack() && !is_virtual()) failed: type check #5164
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
Conversation
👋 Welcome back fmatte! A progress list of the required criteria for merging this PR into |
/label hotspot-gc hotspot-compiler |
@fmatte1 The |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using an additional register + move does not seem right to fix this.
The problem is that addr->type()
is T_OBJECT
and the type of the virtual register tmp
is T_LONG
, right?
What about this?
LIR_Opr tmp = gen->new_register(addr->type());
Could the reporter provide a reproducer?
Hi Tobias, A fatal error has been detected by the Java Runtime Environment:Internal Error (/tank/fmatte/bugs/8272563/openjdk-reproduce-5164/src/hotspot/share/c1/c1_LIR.hpp:413), pid=28744, tid=28763assert(is_double_stack() && !is_virtual()) failed: type checkJRE version: OpenJDK Runtime Environment (16.0.2) (fastdebug build 16.0.2-internal+0-adhoc.fmatte.openjdk-reproduce-5164)Java VM: OpenJDK 64-Bit Server VM (fastdebug 16.0.2-internal+0-adhoc.fmatte.openjdk-reproduce-5164, compiled mode, tiered, compressed oops, compressed class ptrs, serial gc, linux-amd64)Problematic frame:V [libjvm.so+0x7202f3] LIR_OprDesc::double_stack_ix() const+0x43Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /tank/fmatte/bugs/8272563/openjdk-reproduce-5164/core.28744)An error report file with more information is saved as:error.logCompiler replay data is saved as:/tank/fmatte/bugs/8272563/openjdk-reproduce-5164/replay_pid28744.logIf you would like to submit a bug report, please visit:https://bugreport.java.com/bugreport/crash.jsp |
I think we have to somehow tell the register allocator not to spill arguments of type converting moves. We already have some logic there to prevent spills in logic and arithmetic involving T_OBJECT: jdk/src/hotspot/share/c1/c1_LinearScan.cpp Line 1135 in d732c30
Perhaps we should also detect the conversion case when ( src and dst ) are of different types and force both to be in registers? Basically insert some logic here (reg-reg move):jdk/src/hotspot/share/c1/c1_LinearScan.cpp Line 1068 in d732c30
Check the types, and if it's the T_OBJECT->T_LONG situation return mustHaveRegister ?
May be there is better solution, but that's the first thing that came to mind. |
Hi Igor, Thanks for looking into this and thanks for the pointers to handle the spills in logic involved in T_OBJECT to T_LONG mov's and Also to check the src and dst must have the registers. In jdk/src/hotspot/share/c1/c1_LinearScan.cpp Line 1135 in d732c30
Thanks, |
Well, an extra temp register won't solve it, right? You're just getting lucky that tmp2 is not getting spilled. If that happens you get exactly the same situation as before, don't you? |
yes that's being the case. |
Oh, hey! Another much easier idea. Do it with a
It will force |
Hi Igor, Possibly you mean this, |
Good. You don't actually need to check if it's an oop or not. You can just do |
Thanks, updated the patch. |
Looks good! |
@fmatte1 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 122 new commits pushed to the
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 (@TobiHartmann, @veresov) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
/integrate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me too!
/sponsor |
Going to push as commit a58cf16.
Your commit was automatically rebased without conflicts. |
@TobiHartmann @fmatte1 Pushed as commit a58cf16. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This patch is proposed by the submitter of the bug - ugawa@ci.i.u-tokyo.ac.jp
The method CardTableBarrierSetC1::post_barrier generates a move LIR when TwoOperandLIRForm flag is true to move the address to be marked in the card table to a temporary register.
No issues found in local testing and Mach5 tier1-3
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5164/head:pull/5164
$ git checkout pull/5164
Update a local copy of the PR:
$ git checkout pull/5164
$ git pull https://git.openjdk.java.net/jdk pull/5164/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5164
View PR using the GUI difftool:
$ git pr show -t 5164
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5164.diff