-
Bug
-
Resolution: Fixed
-
P4
-
21, 24, 25
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8366371 | 21.0.9 | Thomas Stuefe | P4 | Resolved | Fixed | master |
if (expand(expand_bytes, _workers)) {
...
return attempt_allocation_at_safepoint(word_size, false);
}
We found that when expand() returns true, attempt_allocation_at_safepoint() could immediately return nullptr. This is counter-intuitive, because allocation immediately after a heap expansion should normally succeed. One possible cause is another thread immediately uses up the newly created region, because expand() and attempt_allocation_at_safepoint() are not atomic.
This mostly affects use cases for SoftMaxHeapSize, where setting a small SoftMaxHeapSize could cause OutOfMemoryError. To work around it, we internally revived the removed attempt_allocation_force() method (deleted by
- backported by
-
JDK-8366371 G1CollectedHeap::expand_and_allocate() may fail to allocate even after heap expansion succeeds
-
- Resolved
-
- relates to
-
JDK-8253413 [REDO] [REDO] G1 incorrectly limiting young gen size when using the reserve can result in repeated full gcs
-
- Resolved
-
-
JDK-8236073 G1: Use SoftMaxHeapSize to guide GC heuristics
-
- Open
-
-
JDK-8331562 G1: Remove API to force allocation of new regions
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk21u-dev/c3a37618
-
Commit(master) openjdk/jdk/804a8fa4
-
Review(master) openjdk/jdk21u-dev/2024
-
Review(master) openjdk/jdk/24257