On linuxppc64le, we run into this error on some machines :
"fatal error: FLAG_SET_ERGO cannot be used to set an invalid value for NonNMethodCodeHeapSize"
In stderr we see the output : stderr: [uintx NonNMethodCodeHeapSize=0 is outside the allowed range [ 65536 ... 18446744073709551615 ]
stack is below :
# Internal Error (jvmFlagAccess.cpp:71), pid=60589, tid=60596
# fatal error: FLAG_SET_ERGO cannot be used to set an invalid value for NonNMethodCodeHeapSize
#
# JRE version: (24.0) (build )
# Java VM: OpenJDK 64-Bit Server VM (24-internal-adhoc.jenkinsi.jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-ppc64le)
# Problematic frame:
# V [libjvm.so+0xab8b0c] TypedFlagAccessImpl<bool, EventBooleanFlagChanged>::check_constraint_and_set(JVMFlag*, void*, JVMFlagOrigin, bool) const [clone .part.0]+0x4c
#
Host: POWER9 (architected), altivec supported, 64 cores, 61G, Red Hat Enterprise Linux release 9.3 (Plow)
Time: Mon Jun 17 22:05:06 2024 CEST elapsed time: 0.006976 seconds (0d 0h 0m 0s)
--------------- T H R E A D ---------------
Current thread (0x00007fff8c02eb90): JavaThread "Unknown thread" [_thread_in_vm, id=60596, stack(0x00007fff92ff0000,0x00007fff931f0000) (2048K)]
Stack: [0x00007fff92ff0000,0x00007fff931f0000], sp=0x00007fff931eda70, free space=2038k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0xab8b0c] TypedFlagAccessImpl<bool, EventBooleanFlagChanged>::check_constraint_and_set(JVMFlag*, void*, JVMFlagOrigin, bool) const [clone .part.0]+0x4c (jvmFlagAccess.cpp:71)
V [libjvm.so+0xabfe38] RangedFlagAccessImpl<unsigned long, EventUnsignedLongFlagChanged>::set_impl(JVMFlag*, void*, JVMFlagOrigin) const+0x1c68 (jfrEncoders.hpp:236)
V [libjvm.so+0xaba430] JVMFlagAccess::set_or_assert(JVMFlagsEnum, int, void*, JVMFlagOrigin)+0xb0 (jvmFlagAccess.cpp:49)
V [libjvm.so+0x5fdb5c] CodeCache::initialize_heaps()+0x4dc (jvmFlagAccess.hpp:100)
V [libjvm.so+0x5fe0fc] CodeCache::initialize()+0x6c (codeCache.cpp:1118)
V [libjvm.so+0x920188] init_globals()+0x78 (init.cpp:125)
V [libjvm.so+0x10a9b40] Threads::create_vm(JavaVMInitArgs*, bool*)+0x350 (threads.cpp:550)
V [libjvm.so+0xa5134c] JNI_CreateJavaVM+0x9c (jni.cpp:3581)
C [libjli.so+0x7374] JavaMain+0xd4 (java.c:1592)
C [libjli.so+0xcbd8] ThreadJavaMain+0x18 (java_md.c:653)
C [libc.so.6+0xb0044] start_thread+0x184
The issue is triggered when running HS :tier1 , e.g. test runtime/os/TestTracePageSizes.java#G1 .
This issue might be related to certain page size features available on the machine.