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

C1 overflows code buffer with VerifyOops and CompressedOops

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • hs22
    • hs20
    • hotspot
    • None
    • b05
    • generic
    • generic
    • Verified

        A jvmg 64-bit VM fails with SPECjvm98 and -XX:+TieredCompilation -XX:+VerifyOops -XX:ObjectAlignmentInBytes=16 -XX:+UseCompressedOops because C1 overflows the code buffer.

        This happens during emission of LIR_OpAllocObj. C1 assumes that a LIR instruction will fit into 1K but in this case it's not true because the allocation code is pretty large and oop verfication adds an order of magnitude more of additional code.

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/tmp/jprt/P2/190015.kvn/source/src/share/vm/asm/codeBuffer.hpp:178), pid=24633, tid=13
        # assert(allocates2(pc)) failed: not in CodeBuffer memory: 0xfffffd7ff70f85e0 <= 0xfffffd7ff7137061 <= 0xfffffd7ff7137060
        #
        # JRE version: 7.0-b147
        # Java VM: OpenJDK 64-Bit Server VM (22.0-b02-internal-201108301900.kvn.7085137-jvmg mixed mode solaris-amd64 compressed oops)
        # Core dump written. Default location: /opt/jprt/products/P1/jvm98/jvm98/core or core.24633
        #
        # If you would like to submit a bug report, please visit:
        # http://bugreport.sun.com/bugreport/crash.jsp
        #

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

        Current thread (0x0000000000bd4000): JavaThread "C1 CompilerThread2" daemon [_thread_in_native, id=13, stack(0xfffffd7fb1935000,0xfffffd7fb1a35000)]

        Stack: [0xfffffd7fb1935000,0xfffffd7fb1a35000], sp=0xfffffd7fb1a32ee0, free space=1015k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0x13f5424] void VMError::report(outputStream*)+0x1334
        V [libjvm.so+0x13f6be0] void VMError::report_and_die()+0x9b0
        V [libjvm.so+0xc53c0a] void report_vm_error(const char*,int,const char*,const char*)+0x9a
        V [libjvm.so+0x8103db] void CodeSection::set_end(unsigned char*)+0xab
        V [libjvm.so+0x921979] void AbstractAssembler::sync()+0x89
        V [libjvm.so+0x921780] void AbstractAssembler::emit_long(int)+0x40
        V [libjvm.so+0x92344e] void Assembler::emit_data(int,const RelocationHolder&,int)+0x16e
        V [libjvm.so+0x924519] void Assembler::emit_operand(RegisterImpl*,RegisterImpl*,RegisterImpl*,Address::ScaleFactor,int,const RelocationHolder&,int)+0x819
        V [libjvm.so+0x925a65] void Assembler::emit_operand(RegisterImpl*,Address,int)+0x45
        V [libjvm.so+0x93549e] void Assembler::cmpq(RegisterImpl*,Address)+0xee
        V [libjvm.so+0x940b11] void MacroAssembler::cmpptr(RegisterImpl*,AddressLiteral)+0x211
        V [libjvm.so+0x94ea63] void MacroAssembler::verify_heapbase(const char*)+0x1a3
        V [libjvm.so+0x94ec6c] void MacroAssembler::encode_heap_oop_not_null(RegisterImpl*)+0x2c
        V [libjvm.so+0xa8a30f] void C1_MacroAssembler::initialize_header(RegisterImpl*,RegisterImpl*,RegisterImpl*,RegisterImpl*,RegisterImpl*)+0x29f
        V [libjvm.so+0xa8aa36] void C1_MacroAssembler::initialize_object(RegisterImpl*,RegisterImpl*,RegisterImpl*,int,RegisterImpl*,RegisterImpl*)+0xa6
        V [libjvm.so+0xa8a981] void C1_MacroAssembler::allocate_object(RegisterImpl*,RegisterImpl*,RegisterImpl*,int,int,RegisterImpl*,Label&)+0x131
        V [libjvm.so+0xa1ecee] void LIR_Assembler::emit_alloc_obj(LIR_OpAllocObj*)+0x27e
        V [libjvm.so+0xa03512] void LIR_OpAllocObj::emit_code(LIR_Assembler*)+0x22
        V [libjvm.so+0xa0e445] void LIR_Assembler::emit_lir_list(LIR_List*)+0x205
        V [libjvm.so+0xa0e1e2] void LIR_Assembler::emit_block(BlockBegin*)+0x2a2
        V [libjvm.so+0xa0dedb] void LIR_Assembler::emit_code(BlockList*)+0x7b
        V [libjvm.so+0x9b847c] int Compilation::emit_code_body()+0x1cc
        V [libjvm.so+0x9b88f4] int Compilation::compile_java_method()+0x344
        V [libjvm.so+0x9b8d26] void Compilation::compile_method()+0x126
        V [libjvm.so+0x9b9628] Compilation::Compilation(AbstractCompiler*,ciEnv*,ciMethod*,int,BufferBlob*)+0x348
        V [libjvm.so+0x9bccea] void Compiler::compile_method(ciEnv*,ciMethod*,int)+0xfa
        V [libjvm.so+0xbd0a39] void CompileBroker::invoke_compiler_on_method(CompileTask*)+0x649
        V [libjvm.so+0xbcfcf1] void CompileBroker::compiler_thread_loop()+0x4c1
        V [libjvm.so+0x137b7c8] void compiler_thread_entry(JavaThread*,Thread*)+0x78
        V [libjvm.so+0x1375673] void JavaThread::thread_main_inner()+0x153
        V [libjvm.so+0x1375511] void JavaThread::run()+0x271
        V [libjvm.so+0x11a0198] java_start+0x258
        C [libc.so.1+0xd504b] _thr_setup+0x5b
        C [libc.so.1+0xd5280] ht_pause+0x10


        Current CompileTask:
        C1: 377308 195 %s! 3 spec.benchmarks._213_javac.Javac::compile @ 584 (1289 bytes)

              iveresov Igor Veresov
              iveresov Igor Veresov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: