RFR: 8256435: [TESTBUG] java/foreign/TestHandshake.java fails with direct buffer memory OOM

Maurizio Cimadamore mcimadamore at openjdk.java.net
Tue Nov 17 12:15:09 UTC 2020


On Tue, 17 Nov 2020 09:07:03 GMT, Nick Gasson <ngasson at openjdk.org> wrote:

> I ran this test on a machine with 224 logical CPUs and it fails with:
> 
>   ITERATION 3
>   test TestHandshake.testHandshake("SegmentMismatchAccessor", TestHandshake$$Lambda$57/0x00000001000e7968 at 37c4b344): failure
>   java.lang.OutOfMemoryError: Cannot reserve 1000000 bytes of direct buffer memory (allocated: 536008192, limit: 536870912)
> 
> SegmentMismatchAccessor allocates a 1MB native segment for each CPU on
> each iteration. This can quickly reach the allocation limit if there is
> no intervening GC. Explicitly close the segment after each iteration to
> release the memory.

Whoops - good catch!

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

Marked as reviewed by mcimadamore (Reviewer).

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


More information about the core-libs-dev mailing list