RFR: 8166554: Avoid compilation blocking in OverloadCompileQueueTest.java
Evgeny Nikitin
enikitin at openjdk.java.net
Mon Sep 7 10:05:44 UTC 2020
**Problem explanation**
1. The stress test [uses 0.8 of allowed running
time](https://hg.openjdk.java.net/jdk/jdk/file/e10f558e1df5/test/hotspot/jtreg/compiler/codecache/stress/CodeCacheStressRunner.java#l40)
+ 10 seconds, thus exceeding the limit; 2. 10 additional seconds are [given by the
VM](https://hg.openjdk.java.net/jdk/jdk/file/6db0cb3893c5/src/hotspot/share/runtime/vmOperations.cpp#l388) for stuck
compiler threads to finish; 3. Compiler threads aren't progressing due to the compilation being blocked; 4. Compilation
is blocked via WhiteBox by the test, its lockUnlock thread; 5. The lockUnlock thread doesn't unblock the compilation
because [it is a
daemon](https://hg.openjdk.java.net/jdk/jdk/file/e10f558e1df5/test/hotspot/jtreg/compiler/codecache/stress/Helper.java#l59),
it is stopped in the middle of the sleep.
**Solution**
Since the 'lockUnlock' is started via InfiniteLoop, it's not possible to un-daemon it. So I just turned the lockUnlock
method into a Thread descendant, which got joined in the end.
-------------
Commit messages:
- 8166554: Avoid compilation blocking in OverloadCompileQueueTest.java
Changes: https://git.openjdk.java.net/jdk/pull/46/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=46&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8166554
Stats: 46 lines in 1 file changed: 28 ins; 14 del; 4 mod
Patch: https://git.openjdk.java.net/jdk/pull/46.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/46/head:pull/46
PR: https://git.openjdk.java.net/jdk/pull/46
More information about the hotspot-compiler-dev
mailing list