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

Vladimir Kozlov kvn at openjdk.org
Thu Jan 22 02:00:51 UTC 2026


On Wed, 10 Dec 2025 10:18:53 GMT, David Briemann <dbriemann at openjdk.org> wrote:

>> Aligning upwards instead of downwards not only solves the crash in large huge page scenarios but also ensures that the cache sizes are at least as big as they were set.
>
> Thanks for the reviews!

@dbriemann,  this change invalidated assumption that ReservedCodeCacheSize can't change if specified on command line. You replaced `align_down` with `align_up` but did not check that `cache_size` may increase after that.

It also causing issue with AOT because CodeCache size varies between different phases because we use different number of compiler threads and as result different NonNmethod section size.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/28658#issuecomment-3782072965


More information about the hotspot-compiler-dev mailing list