VM exits during ergonomic calculations: fatal error: FLAG_SET_ERGO cannot be used to set an invalid value for Tier3BackEdgeThreshold

XMLWordPrintable

    • b08
    • 17

      VM crashes during ergonomic calculations: fatal error: FLAG_SET_ERGO cannot be used to set an invalid value for Tier3BackEdgeThreshold.

      The issue happens when running any program with "-XX:CompileThreshold=100 -XX:TieredStopAtLevel=1 -XX:OnStackReplacePercentage=2147483680" but maybe there are other ways.

      With JDK 21+ (after JDK-8224980, changed FLAG_SET_ERGO handling), we get:
      fatal error: FLAG_SET_ERGO cannot be used to set an invalid value for Tier3BackEdgeThreshold

      Otherwise, with JDK 17+ (after JDK-8251462), we get:
      intx Tier3BackEdgeThreshold=2147483680 is outside the allowed range [ 0 ... 2147483647 ]
      OnStackReplacePercentage (2147483680) must be between 0 and 1073741823
      Error: Could not create the Java Virtual Machine.
      Error: A fatal exception has occurred. Program will exit.


      Stack: [0x00007ff84be25000,0x00007ff84bf25000], sp=0x00007ff84bf216b0, free space=1009k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x1ca8b73] VMError::report(outputStream*, bool)+0x3203 (jvmFlagAccess.cpp:117)
      V [libjvm.so+0x1cac413] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void const*, void const*, char const*, int, unsigned long)+0x5a3 (vmError.cpp:1888)
      V [libjvm.so+0xc8a7db] report_fatal(VMErrorType, char const*, int, char const*, ...)+0x10b (debug.cpp:223)
      V [libjvm.so+0x12d1764] (jvmFlagAccess.cpp:117)
      V [libjvm.so+0x12d8ce8] RangedFlagAccessImpl<long, EventLongFlagChanged>::set_impl(JVMFlag*, void*, JVMFlagOrigin) const+0x968 (jfrWriterHost.inline.hpp:41)
      V [libjvm.so+0xbd22ab] CompilerConfig::set_legacy_emulation_flags()+0x39b (jvmFlagAccess.hpp:100)
      V [libjvm.so+0xbd3350] CompilerConfig::ergo_initialize()+0x20 (compilerDefinitions.cpp:581)
      V [libjvm.so+0x73e6de] Arguments::apply_ergo()+0x5e (arguments.cpp:3836)
      V [libjvm.so+0x1bd0aa7] Threads::create_vm(JavaVMInitArgs*, bool*)+0x147 (threads.cpp:505)
      V [libjvm.so+0x1245864] JNI_CreateJavaVM+0x54 (jni.cpp:3621)
      C [libjli.so+0x3e7f] JavaMain+0x8f (java.c:1506)
      C [libjli.so+0x8099] ThreadJavaMain+0x9 (java_md.c:646)

            Assignee:
            Unassigned
            Reporter:
            Daniel Skantz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: