VM crashes on init when NonNMethodCodeHeapSize is set too small and UseTransparentHugePages is enabled

XMLWordPrintable

    • b02
    • linux

        Running the VM with e.g.
        java -XX:NonNMethodCodeHeapSize=1200K -X:+UseTransparentHugePages -version

        will result in
        uintx NonNMethodCodeHeapSize=0 is outside the allowed range [ 4096 ... 18446744073709551615 ]
        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (jvmFlagAccess.cpp:70), pid=123765, tid=123768
        # fatal error: FLAG_SET_ERGO cannot be used to set an invalid value for NonNMethodCodeHeapSize
        #

        This happens when the page size is larger than the code heap segment size. Then align_down will reduce the size value to 0 and continue to call FLAG_SET_ERGO with this invalid value.

        The proposed solution is to set the non nmethod code heap size to the minimal possible size when validating the parameter.

              Assignee:
              David Briemann
              Reporter:
              David Briemann
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: