RFR: 8272563: Possible assertion failure in CardTableBarrierSetC1

Fairoz Matte fmatte at openjdk.java.net
Thu Aug 26 14:29:26 UTC 2021


On Wed, 18 Aug 2021 12:37:00 GMT, Fairoz Matte <fmatte at openjdk.org> wrote:

> This patch is proposed by the submitter of the bug - ugawa at 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.
>> __ move(addr, tmp);
> However, this code only guarantees that `addr` is a valid register for LIR, which can be a virtual register. If the virtual register for `addr` is spilled to the stack by chance, the `move(addr, tmp)` is compiled to a memory-to-register which causes an assertion failure because a memory-to-register move requires their arguments to have the same size. 
> The fix is to check if it is is_oop() and call the mov appropriately.
> 
> No issues found in local testing and Mach5 tier1-3

Hi Tobias, 
Thanks for looking into this thread. There is reproducer but it has lot of dependencies with dacapo-9.12-MR1-bach.jar and I am unable to isolate to smaller case.
I tried with your suggestion but could not resolve the issue.
Below is the original issue reproduced on fastdebug build (Updated the jbs bug)
# 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=28763
#  assert(is_double_stack() && !is_virtual()) failed: type check
#
# JRE 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+0x43
#
# Core 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.log
#
# Compiler replay data is saved as:
# /tank/fmatte/bugs/8272563/openjdk-reproduce-5164/replay_pid28744.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp

-------------

PR: https://git.openjdk.java.net/jdk/pull/5164



More information about the hotspot-gc-dev mailing list