Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8143067

aarch64: guarantee failure in javac

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • None
    • b96
    • aarch64
    • linux

      One of our partners has reported the following error when building Apache Bigtop.

      # Internal Error (assembler_aarch64.hpp:223), pid=42005, tid=1827
      # guarantee(chk == -1 || chk == 0) failed: Field too big for insn

      I have trapped this in gdb and the problem is that an adrp to the byte map base is becoming out of range when the code buffer is being relocated.

      Here is a snapshot from gdb


      #5 0x000003ffb5fbefbc in MacroAssembler::pd_patch_instruction_size (
          branch=0x3ffa664b088 "\353\251\200\220`\001\n\213\n", target=0x3fea6600000 "")
          at /home/ed/new_jdk9/dev/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp:137
      137 Instruction_aarch64::spatch(branch, 23, 5, offset);
      (gdb) list
      132 assert(offset_lo == 0, "offset must be 0 for polling page or byte map base");
      133 }
      134 }
      135 int offset_lo = offset & 3;
      136 offset >>= 2;
      137 Instruction_aarch64::spatch(branch, 23, 5, offset);
      138 Instruction_aarch64::patch(branch, 30, 29, offset_lo);
      139 } else if (Instruction_aarch64::extract(insn, 31, 21) == 0b11010010100) {
      140 u_int64_t dest = (u_int64_t)target;
      141 // Move wide constant
      (gdb) p/x branch
      $27 = 0x3ffa664b088
      (gdb) x/10i 0x3ffa664b088-20
         0x3ffa664b074: ldr w24, [x26,#16]
         0x3ffa664b078: sxtb w29, w21
         0x3ffa664b07c: str w13, [x22,#16]
         0x3ffa664b080: cbz x10, 0x3ffa664b100
         0x3ffa664b084: lsr x10, x11, #9
         0x3ffa664b088: adrp x11, 0x3fea7b87000 <<<< Instruction being patched
         0x3ffa664b08c: add x0, x11, x10
         0x3ffa664b090: ldrsb w10, [x0]
         0x3ffa664b094: cmp w10, #0x20
         0x3ffa664b098: b.eq 0x3ffa664b100
      (gdb) p/x target <<<< Byte map base
      $28 = 0x3fea6600000
      (gdb) p/x 0x3ffa664b088-0x3fea6600000
      $29 = 0x10004b088 <<<<< Offset > 4G

      Also attached is a hs_err log

            enevill Ed Nevill
            enevill Ed Nevill
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 2 days
                2d
                Remaining:
                Remaining Estimate - 2 days
                2d
                Logged:
                Time Spent - Not Specified
                Not Specified