The error was caused by a kernel problem with UEK kernels that prevented os::pretouch_memory from working correctly. The only test picking up on that was runtime/Thread/TestAlwaysPreTouchStacks.java. But that's not even its job, all it wants to do is to test the AlwaysPreTouchStacks option.
We have a bunch of AlwaysPreTouch tests (GC specific, and not for every GC, e.g. test/hotspot/jtreg/gc/epsilon/TestAlwaysPretouch.java, test/hotspot/jtreg/gc/x/TestAlwaysPreTouch.java, same for z, and one for Shenandoah.)
All of them do the same: the start the JVM with AlwaysPreTouch, then do nothing. The VM coming up is proof it works. But that is not enough, we should - at least on Linux where this is easily possible - test that we actually pretouch, by observing RSS. Note that TestAlwaysPreTouchStacks.java does that via the inbuilt NMT capability to measure live memory in stacks, that won't work here. We will have to scan /proc/self/status (I think restricting this test to linux for now is fine).
Therefore, I propose:
- start JVMs with Xint, and with a reasonably large heap. E.g. 512MB or 1G.
- when the VM is up, check RSS. It should be larger than the amount we pretouched.
I think also that these tests could be unified for all GCs, and also ran for Serial, Parallel and G1.
- relates to
-
JDK-8334513 New test gc/TestAlwaysPreTouchBehavior.java is failing
- Open
-
JDK-8324781 runtime/Thread/TestAlwaysPreTouchStacks.java failed with Expected a higher ratio between stack committed and reserved
- Resolved