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

[AArch64] C1 compilation fails with "Field too big for insn"

    XMLWordPrintable

Details

    • b03
    • aarch64
    • linux

    Backports

      Description

        ### Failure analysis ###
        The issue is due to using PC-relative addressing (the aarch64 adr instruction) with an (unusually) large non-nmethod code heap size. Attempting to load the address of a constant that is out of range triggers the assert/guarantee.

        ### Original report ###
        In the tier 6 test run that included the fix for JDK-8319700 we saw the same failure.

        Test: compiler/arguments/TestC1Globals.java#id4

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/opt/mach5/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S10903/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0724edac-4f9d-4b23-a291-90fd75eb8a31/runs/365cdd81-6ab1-4745-a986-7340646f3a7b/workspace/open/src/hotspot/cpu/aarch64/assembler_aarch64.hpp:265), pid=2092794, tid=2092814
        # guarantee(chk == -1 || chk == 0) failed: Field too big for insn
        #
        # JRE version: Java(TM) SE Runtime Environment (22.0+26) (fastdebug build 22-ea+26-2029)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 22-ea+26-2029, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
        # Problematic frame:
        # V [libjvm.so+0x5b9958] Assembler::adr(Register, unsigned char*)+0x148
        #
        Host: AArch64, 8 cores, 30G, Oracle Linux Server release 8.8
        Time: Fri Nov 24 01:16:05 2023 UTC elapsed time: 2.811199 seconds (0d 0h 0m 2s)

        --------------- T H R E A D ---------------

        Current thread (0x0000ffff7837e0a0): JavaThread "C1 CompilerThread0" daemon [_thread_in_native, id=2092814, stack(0x0000ffff23e02000,0x0000ffff24000000) (2040K)]

        Current CompileTask:
        C1:2811 242 b 3 java.util.HashMap::putMapEntries (170 bytes)

        Stack: [0x0000ffff23e02000,0x0000ffff24000000], sp=0x0000ffff23ffbc00, free space=2023k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0x5b9958] Assembler::adr(Register, unsigned char*)+0x148 (assembler_aarch64.hpp:265)
        V [libjvm.so+0x698ff8] LIR_Assembler::const2reg(LIR_Opr, LIR_Opr, LIR_PatchCode, CodeEmitInfo*)+0x3b8 (c1_LIRAssembler_aarch64.cpp:588)
        V [libjvm.so+0x68c194] LIR_Assembler::move_op(LIR_Opr, LIR_Opr, BasicType, LIR_PatchCode, CodeEmitInfo*, bool, bool)+0x310 (c1_LIRAssembler.cpp:816)
        V [libjvm.so+0x68da68] LIR_Assembler::emit_lir_list(LIR_List*)+0xf8 (c1_LIRAssembler.cpp:304)
        V [libjvm.so+0x68e6f0] LIR_Assembler::emit_code(BlockList*)+0x270 (c1_LIRAssembler.cpp:269)
        V [libjvm.so+0x63720c] Compilation::emit_code_body()+0x14c (c1_Compilation.cpp:358)
        V [libjvm.so+0x6377d0] Compilation::compile_java_method()+0x390 (c1_Compilation.cpp:421)
        V [libjvm.so+0x638060] Compilation::compile_method()+0x1fc (c1_Compilation.cpp:482)
        V [libjvm.so+0x6386ec] Compilation::Compilation(AbstractCompiler*, ciEnv*, ciMethod*, int, BufferBlob*, bool, DirectiveSet*)+0x25c (c1_Compilation.cpp:612)
        V [libjvm.so+0x63a464] Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0xa4 (c1_Compiler.cpp:258)
        V [libjvm.so+0x8f2b44] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x7e0 (compileBroker.cpp:2305)
        V [libjvm.so+0x8f372c] CompileBroker::compiler_thread_loop()+0x598 (compileBroker.cpp:1964)
        V [libjvm.so+0xd6b248] JavaThread::thread_main_inner()+0xe4 (javaThread.cpp:720)
        V [libjvm.so+0x159a1e0] Thread::call_run()+0xac (thread.cpp:220)
        V [libjvm.so+0x130d4cc] thread_native_entry(Thread*)+0x12c (os_linux.cpp:787)
        C [libpthread.so.0+0x7928] start_thread+0x188

        Attachments

          Issue Links

            Activity

              People

                dlunden Daniel Lunden
                dholmes David Holmes
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: