[aarch64-port-dev ] guarantee failure in jcstress

Edward Nevill edward.nevill at linaro.org
Fri Jul 4 13:40:40 UTC 2014


Hi,

The overnight run of jcstress generated a guarantee failure.

I have put the hs_err log at

http://people.linaro.org/~edward.nevill/jcstress/hs_err_pid3672.log

and the JDK image at

http://people.linaro.org/~edward.nevill/jcstress/j2sdk-image-184.tgz

I have disassembled the image at the location reported in the error log and it seems to be occurring at the following source location.


>From macroAssembler_aarch64.cpp around line 75

void MacroAssembler::pd_patch_instruction(address branch, address target) {
  assert((uint64_t)target < (1ul << 48), "48-bit overflow in address constant");
  long offset = (target - branch) >> 2;
  unsigned insn = *(unsigned*)branch;
  if ((Instruction_aarch64::extract(insn, 29, 24) & 0b111011) == 0b011000) {
    // Load register (literal)
    Instruction_aarch64::spatch(branch, 23, 5, offset);
  } else if (Instruction_aarch64::extract(insn, 30, 26) == 0b00101) {
    // Unconditional branch (immediate)
<<<< guarantee failure seems to occur on the next line >>>>
    Instruction_aarch64::spatch(branch, 25, 0, offset);
  } else if (Instruction_aarch64::extract(insn, 31, 25) == 0b0101010) {
    // Conditional branch (immediate)
    Instruction_aarch64::spatch(branch, 23, 5, offset);
  } else if (Instruction_aarch64::extract(insn, 30, 25) == 0b011010) {


>From the hs_err log

CodeCache: size=245760Kb used=130322Kb max_used=130339Kb free=115437Kb

So 130322Kb is less than 128M but maybe there are holes in the code cache?

But I am fairly convinced this is the location. In the hs_err log the error occurs at pd_patch_instruction + 0x1e4.

V  [libjvm.so+0x812a24]  VMError::report_and_die()+0x148
V  [libjvm.so+0x39da48]  report_vm_error(char const*, int, char const*, char const*)+0x6c
V  [libjvm.so+0x605d3c]  MacroAssembler::pd_patch_instruction(unsigned char*, unsigned char*)+0x1e4
V  [libjvm.so+0x338514]  CodeBuffer::relocate_code_to(CodeBuffer*) const+0x1b8

and from the objdump of libjvm.so
0000000000608808 <_ZN14MacroAssembler20pd_patch_instructionEPhS0_>:
  608808:       a9bc7bfd        stp     x29, x30, [sp,#-64]!
  60880c:       910003fd        mov     x29, sp
  608810:       a90153f3        stp     x19, x20, [sp,#16]
  608814:       a9025bf5        stp     x21, x22, [sp,#32]
  608818:       f9001bf7        str     x23, [sp,#48]
  60881c:       b9400002        ldr     w2, [x0]
  608820:       aa0003f3        mov     x19, x0
  608824:       aa0103f5        mov     x21, x1
  608828:       53187c40        lsr     w0, w2, #24
  60882c:       52800761        mov     w1, #0x3b                       // #59
  608830:       0a010001        and     w1, w0, w1
  608834:       cb1302b4        sub     x20, x21, x19
  608838:       7100603f        cmp     w1, #0x18
  60883c:       9342fe96        asr     x22, x20, #2
  608840:       540003c0        b.eq    6088b8 <_ZN14MacroAssembler20pd_patch_instructionEPhS0_+0xb0>
  608844:       d35a7841        ubfx    x1, x2, #26, #5
<<<< This is the == 0b00101 case above >>>
  608848:       7100143f        cmp     w1, #0x5
  60884c:       54000b80        b.eq    6089bc <_ZN14MacroAssembler20pd_patch_instructionEPhS0_+0x1b4>

and at pd_patch_instruction + 0x1b4

  6089bc:       935bfe94        asr     x20, x20, #27
  6089c0:       91000694        add     x20, x20, #0x1
  6089c4:       f100069f        cmp     x20, #0x1
  6089c8:       54000169        b.ls    6089f4 <_ZN14MacroAssembler20pd_patch_instructionEPhS0_+0x1ec>
  6089cc:       b0001180        adrp    x0, 839000 <reduceOp+0x390>
  6089d0:       b0001182        adrp    x2, 839000 <reduceOp+0x390>
  6089d4:       b0001183        adrp    x3, 839000 <reduceOp+0x390>
  6089d8:       91350042        add     x2, x2, #0xd40
  6089dc:       91312000        add     x0, x0, #0xc48
  6089e0:       52801c01        mov     w1, #0xe0                       // #224
  6089e4:       9133a063        add     x3, x3, #0xce8
  6089e8:       97f65e25        bl      3a027c <_Z15report_vm_errorPKciS0_S0_>
pd_patch_instruction + 0x1e4
  6089ec:       9402ad6c        bl      6b3f9c <breakpoint>

I have suggested to Andrew (McDermott) that he use -XX:-TieredCompilation in the overnight tests for jcstress in order that we can get some results.

So, what to do? Should we fix the code cache at 128M?

All the best,
Ed.




More information about the aarch64-port-dev mailing list