RFR: 8265332: gtest/LargePageGtests.java OOMEs on -XX:+UseSHM cases
Aleksey Shipilev
shade at openjdk.java.net
Fri Apr 16 10:15:58 UTC 2021
It looks like some `+UseSHM` test cases added by [JDK-8213269](https://bugs.openjdk.java.net/browse/JDK-8213269) reliably blow up the VM log reader with OOME. There are lots of `OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory.` in the log, if you increase the test heap size. AFAIU, many of those messages are expected from the new test cases.
I believe ultimately this test produces a virtually unbounded number of warning messages, which would eventually blow out the Java heap. `ConcurrentTestRunner` runs a time-bound number of iterations, which means the faster machine is, the more warning messages would be printed. I believe the way out is to make `ConcurrentTestRunner` to cap the number of iterations, so that VM output length is more predictable.
This is a reliable `tier1` failure on my TR 3970X.
Test times before:
# default
[ OK ] os_linux.reserve_memory_special_concurrent_vm (15003 ms)
# -XX:+UseLargePages
[ OK ] os_linux.reserve_memory_special_concurrent_vm (16121 ms)
# -XX:+UseLargePages -XX:LargePageSizeInBytes=1G
[ OK ] os_linux.reserve_memory_special_concurrent_vm (15006 ms)
# -XX:+UseLargePages -XX:+UseSHM
[ OK ] os_linux.reserve_memory_special_concurrent_vm (15030 ms)
Test times after:
# default
[ OK ] os_linux.reserve_memory_special_concurrent_vm (15003 ms)
# -XX:+UseLargePages
[ OK ] os_linux.reserve_memory_special_concurrent_vm (16071 ms)
# -XX:+UseLargePages -XX:LargePageSizeInBytes=1G
[ OK ] os_linux.reserve_memory_special_concurrent_vm (15006 ms)
# -XX:+UseLargePages -XX:+UseSHM
[ OK ] os_linux.reserve_memory_special_concurrent_vm (1190 ms)
The major difference is that the last mode gets capped by `maxIteration`. This fixes the test failure, as `-XX:+UseSHM` case would produce lots of warnings on my machine.
Additional testing:
- [x] `os_linux` gtest
- [x] `gtest/LargePageGtests.java` used to fail, now passes
-------------
Commit messages:
- 8265332: gtest/LargePageGtests.java OOMEs on -XX:+UseSHM cases
Changes: https://git.openjdk.java.net/jdk/pull/3542/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3542&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8265332
Stats: 23 lines in 4 files changed: 13 ins; 0 del; 10 mod
Patch: https://git.openjdk.java.net/jdk/pull/3542.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/3542/head:pull/3542
PR: https://git.openjdk.java.net/jdk/pull/3542
More information about the hotspot-dev
mailing list