[jdk21u-dev] RFR: 8351500: G1: NUMA migrations cause crashes in region allocation

Severin Gehwolf sgehwolf at openjdk.org
Fri Mar 14 13:22:57 UTC 2025


On Fri, 14 Mar 2025 10:39:38 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

>> This pull request contains a backport of commit [37ec7962](https://github.com/openjdk/jdk/commit/37ec796255ae857588a5c7e0d572407dd81cbec9) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.
>> 
>> The commit being backported was authored by Thomas Stuefe on 13 Mar 2025 and was reviewed by Roman Kennke, Stefan Johansson and Thomas Schatzl.
>> 
>> ---
>> 
>> Please consider this patch for backporting. It fixes a G1 crash we see at a customer with a very large NUMA installation.
>> 
>> The backported patch was in itself not sufficient. For JDK 21 we also must fix up `G1Allocator::attempt_allocation_force`, see commit [7ee2df2ac9c14599a274250dd8ff58c7e6979611](https://github.com/openjdk/jdk21u-dev/pull/1488/commits/7ee2df2ac9c14599a274250dd8ff58c7e6979611) to use the NUMA node index handed in instead of querying libnuma on its own. 
>> 
>> Testing: I tested the patch with a change mimicking tons of NUMA node migrations. Without patch we get crashes/asserts, with patch everything works (I ran a modified version of TestJNICriticalStressTest.java, since that exercises the crashing paths).
>
> Please backport this to JDK 24 first. Thank you!

> @jerboaa So if I understand you correctly, I need to wait until 18.3. until 24 is GA? There is no update branch yet, if I am not mistaken, and the JDK 24 branch is closed for pushes? Waiting would mean I delay the 21 patch by at least a week since I am on PTO next week. I guess that's fine..

@tstuefe 
There is an update *repo* :) The branch on the `jdk` repo is for 24 GA stabilization for JDK 24 GA, yes. Backports for JDK 24 are open here:
https://github.com/openjdk/jdk24u (Currently collecting fixes for 24.0.2 - July)

This can be done now.

> I also am not sure how to enable GHAs on the jdk24 branch. Since it is the same repo as the head release, where I have GHAs enabled, should everything work automatically?

For GHA and JDK 24u you enable it just like for any other *u repo. FWIW, jdk21u-dev collects fixes for 21.0.8 (July). So a week more or less is no issue at this point.

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

PR Comment: https://git.openjdk.org/jdk21u-dev/pull/1488#issuecomment-2724679599


More information about the jdk-updates-dev mailing list