VM crashes with "assert((labs(val) & 0xFFFFFFFF00000000) == 0 || dest == (address)-1) failed: must be 32bit offset or -1" when using too high value for NonNMethodCodeHeapSize

XMLWordPrintable

    • b18
    • 23

      VM crashes with "assert((labs(val) & 0xFFFFFFFF00000000) == 0 || dest == (address)-1) failed: must be 32bit offset or -1" when using too high value for NonNMethodCodeHeapSize.

      Run any program with -XX:NonNMethodCodeHeapSize=12000000K. Already triggers with --version.


      ===
      There are also other failure modes:

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/opt/mach5/mesos/work_dir/slaves/da1065b5-7b94-4f0d-85e9-a3a252b9a32e-S35568/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0749998a-5034-4b32-81b3-be27d8a2b7c1/runs/d604f20f-e69e-4651-82f3-79f998a668d4/workspace/open/src/hotspot/share/utilities/checkedCast.hpp:41), pid=64743, tid=64744
      # assert(static_cast<T1>(result) == thing) failed: must be
      #
      # JRE version: Java(TM) SE Runtime Environment (27.0+4) (fastdebug build 27-ea+4-314)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 27-ea+4-314, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x194c32c] Relocation::pd_set_call_destination(unsigned char*)+0x26c
      ..................
      Command Line: -XX:NonNMethodCodeHeapSize=12000000K
      ..................
      Current CompileTask:
      C2:92 3 4 java.lang.Byte::toUnsignedInt (6 bytes)

      Stack: [0x00007ff1c6900000,0x00007ff1c6a00000], sp=0x00007ff1c69fb470, free space=1005k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x194ad96] Relocation::pd_set_call_destination(unsigned char*)+0x116 (nativeInst_x86.hpp:438)
      V [libjvm.so+0xb513e2] CodeBuffer::relocate_code_to(CodeBuffer*) const+0x422 (codeBuffer.cpp:803)
      V [libjvm.so+0xb560a4] CodeBuffer::copy_code_to(CodeBlob*)+0x324 (codeBuffer.cpp:740)
      V [libjvm.so+0x176bbe2] nmethod::nmethod(Method*, CompilerType, int, int, int, int, int, unsigned char*, CodeOffsets*, int, DebugInformationRecorder*, Dependencies*, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, CompLevel, char*, int, JVMCINMethodData*)+0x3f2 (codeBuffer.hpp:847)
      V [libjvm.so+0x176c53a] nmethod::new_nmethod(methodHandle const&, int, int, CodeOffsets*, int, DebugInformationRecorder*, Dependencies*, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, CompLevel, char*, int, JVMCINMethodData*)+0x28a (nmethod.cpp:1179)
      V [libjvm.so+0xa5e1cd] ciEnv::register_method(ciMethod*, int, CodeOffsets*, int, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, bool, bool, bool, bool, int)+0x37d (ciEnv.cpp:1064)
      V [libjvm.so+0x1829f0d] PhaseOutput::install_code(ciMethod*, int, AbstractCompiler*, bool, bool)+0x16d (output.cpp:3207)
      V [libjvm.so+0xbafd8f] Compile::Code_Gen()+0xabf (compile.cpp:3139)
      V [libjvm.so+0xbb5273] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x2123 (compile.cpp:895)
      V [libjvm.so+0x9cc328] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x498 (c2compiler.cpp:147)
      V [libjvm.so+0xbc4660] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x780 (compileBroker.cpp:2345)
      V [libjvm.so+0xbc5ec0] CompileBroker::compiler_thread_loop()+0x530 (compileBroker.cpp:1989)
      V [libjvm.so+0x112511b] JavaThread::thread_main_inner()+0x13b (javaThread.cpp:776)
      V [libjvm.so+0x1bb14f6] Thread::call_run()+0xb6 (thread.cpp:242)
      V [libjvm.so+0x1807098] thread_native_entry(Thread*)+0x118 (os_linux.cpp:860)

            Assignee:
            Guanqiang Han
            Reporter:
            Daniel Skantz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: