RFR: 8289764: gc/lock tests failed with "OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objects" [v2]
Leonid Mesnik
lmesnik at openjdk.org
Mon Aug 8 15:36:35 UTC 2022
On Sun, 7 Aug 2022 12:50:42 GMT, Ramkumar Sunderbabu <rsunderbabu at openjdk.org> wrote:
>> Tested with all GC options
>
> Ramkumar Sunderbabu has updated the pull request incrementally with one additional commit since the last revision:
>
> 8289764: gc/lock tests failed with "OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objects"
test/hotspot/jtreg/vmTestbase/nsk/share/gc/gp/GarbageUtils.java line 96:
> 94: int iteration = 0;
> 95:
> 96: while (stresser.continueExecution()) {
This loop never completes, while the goal is to produce some garbage and trigger GC.
test/hotspot/jtreg/vmTestbase/nsk/share/gc/gp/GarbageUtils.java line 98:
> 96: while (stresser.continueExecution()) {
> 97: while (iteration++ < YOUNG_GC_ITERATIONS) {
> 98: byteArrayProducer.create(memChunk);
it is needed to create at least some old objects which live after young GC.
I propose to add 'tmp = byteArrayProducer.create(memChunk);' and free this tmp variable tight before WB.fullGC().
So we will have objects with different age (up to to 100).
-------------
PR: https://git.openjdk.org/jdk/pull/9658
More information about the hotspot-dev
mailing list