RFR: JDK-8299388: java/util/regex/NegativeArraySize.java fails on Alpine and sometimes Windows

Martin Doerr mdoerr at openjdk.org
Thu Dec 29 10:03:50 UTC 2022


On Wed, 28 Dec 2022 12:19:16 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> The test java/util/regex/NegativeArraySize.java seems to have high memory requirements, and these requirements lead to some errors.
> On Alpine Linux we run regularly into this error when executing the test:
> result: Failed. Unexpected exit from test [exit code: 137]
> This seems to be OOM related.
> Probably we should avoid running the test on Alpine.
> 
> On Windows the test usually works, but seems to depend as well on the memory situation of the machine.
> Once we got this error recently :
> OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006c0000000, 5368709120, 0) failed; error='The paging file is too small for this operation to complete' (DOS error/errno=1455)
> OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006c0000000, 5368709120, 0) failed; error='The paging file is too small for this operation to complete' (DOS error/errno=1455)
> result: Failed. Unexpected exit from test [exit code: 1]
> 
> The hs_err file generated showed :
> 
> 
> # There is insufficient memory for the Java Runtime Environment to continue.
> # Native memory allocation (mmap) failed to map 5368709120 bytes for G1 virtual space
> # Possible reasons:
> # The system is out of physical RAM or swap space
> # The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
> 
> 
> So it looks like having 5g maxMemory as a requirement is not sufficient for the test (the reported mmap value is already slightly above 5g).

Looks reasonable. Let's hear what other people think.

test/jdk/java/util/regex/NegativeArraySize.java line 28:

> 26:  * @bug 8223174
> 27:  * @summary Pattern.compile() can throw confusing NegativeArraySizeException
> 28:  * @requires os.maxMemory >= 6g & vm.bits == 64  & !vm.musl

Double whitespace.

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

Marked as reviewed by mdoerr (Reviewer).

PR: https://git.openjdk.org/jdk/pull/11796


More information about the core-libs-dev mailing list