RFR: 8261505: Test test/hotspot/jtreg/gc/parallel/TestDynShrinkHeap.java killed by Linux OOM Killer

Stefan Johansson sjohanss at openjdk.java.net
Thu Feb 11 19:42:40 UTC 2021


On Wed, 10 Feb 2021 12:13:54 GMT, Christoph Göttschkes <cgo at openjdk.org> wrote:

> On memory constrained devices, the test might get killed by the linux kernel OOM Killer.
> 
> Executing the test with the JTreg test harness makes the test fail and get killed by the OOM Killer.
> Executing the test manually, by using the JTreg provided "rerun" command line, the test succeeds.
> This happened on a Raspberry PI 2, which has only 1G of memory available.
> 
> I added an "os.maxMemory" requirement, so the test gets skipped.

Marked as reviewed by sjohanss (Reviewer).

Hi Christoph,

This looks good. The test is setting a 1GB max heap so it seems reasonable to require the system to have at least that. 

Another thing to look at when tests are getting killed by the OOM killer is the number of concurrent test jobs. For a system with 1GB of memory that should be 1, so in your case you can't go lower. To be certain you only run one test at a time you could run `configure` with `--with-test-jobs=1 `, but according to `doc/testing.md` this should be the default for your system:
The test concurrency (`-concurrency`).

Defaults to TEST_JOBS (if set by `--with-test-jobs=`), otherwise it defaults to
JOBS, except for Hotspot, where the default is *number of CPU cores/2*,
but never more than *memory size in GB/2*.
 

The reason that the rerun succeeds is most likely because then you don't have the JTREG process running along side the test and consuming resources.

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

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



More information about the hotspot-gc-dev mailing list