RFR: JDK-8245446: vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine/TestDesc…
Serguei Spitsyn
sspitsyn at openjdk.java.net
Tue Dec 8 10:01:19 UTC 2020
The StressRedefine.java (base for redefine stress tests) defines 3 important constants:
private static int staticMethodCallersNumber = 10;
private static int nonstaticMethodCallersNumber = 10;
private static int redefiningThreadsNumber = 40;
The 1st is number of threads to call a static method from constantly redefined class.
The 2nd is number of threads to call am instance method from constantly redefined class.
The 3rd is number of threads to redefine the target class.
The redefiningThreadsNumber=40 is unreasonably big for the StressRedefine test, and there is no chance with -Xcomp for one of the methods above to get resolved without a class redefinition. So, after 100 of non-successfull attempts we hit the guarantee in the open/src/hotspot/share/interpreter/interpreterRuntime.cpp:879
guarantee((retry_count++ < 100)) failed: Could not resolve to latest version of redefined method
To avoid it, the test StressRedefine/TestDescription.java is tweaked to have redefiningThreadsNumber=4.
The test StressRedefineWithoutBytecodeCorruption is worse as it fails even with redefiningThreadsNumber=1. So, a require is added to exclude the test with the -Xcomp flag.
-------------
Commit messages:
- 8245446: vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine/TestDescription.java crash intermittently
Changes: https://git.openjdk.java.net/jdk/pull/1692/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1692&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8245446
Stats: 2 lines in 2 files changed: 2 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/1692.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1692/head:pull/1692
PR: https://git.openjdk.java.net/jdk/pull/1692
More information about the serviceability-dev
mailing list