On Thu, 22 Oct 2020 14:29:28 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

>> You mentioned the possibility that the OOME is not thrown because it is 
>> another thread that consumes all memory than the one calling 
>> forceEarlyReturn() which is supposed to fail with OOME. TLAB could be an 
>> issue then. In general GC could have a heuristic in place to raise OOME in 
>> greedy threads when another thread would still be able to allocate 
>> successfully. I think I could change the debugger part to call 
>> consumeAllMemory() in the debuggee. This should be executed in the same jdwp 
>> agent thread as the later forceEarlyReturn.
>> 
>> But honestly I don't think it is worth it and I cannot even test if it fixes 
>> the issues. I'd prefer to skip the 3 test cases if running with ZGC. Please 
>> let me know what you prefer.
>
>> But honestly I don't think it is worth it and I cannot even test if it fixes 
>> the issues. I'd prefer to skip the 3 test cases if running with ZGC. Please 
>> let me know what you prefer.
> 
> That's one option if this only happens with ZGC. You also mentioned doing 
> retries. I would only suggest that if you think you can limit the chances of 
> the OOME not happening to be so unlikely that we are no likely to ever see it 
> happen.

With the last commit the combined change is

- The 3 problematic test cases are skipped if ZGC is selected.

- They are also skipped if no OOME during object reallocation can be expected
  because allocations are not eliminated.

- In consumeAllMemory, as a last step, empty LinkedList nodes are created
  without long array to fill up small blocks of free memory.

- EATests.java is removed from the problem list for ZGC.

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

PR: https://git.openjdk.java.net/jdk/pull/775

Reply via email to