On Tue, 8 Dec 2020 21:17:16 GMT, Leonid Mesnik <[email protected]> wrote:

>> 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.
>
> looks good.

I don't get serviceability-dev mail anymore because it was being duplicated 
with hotspot-runtime-dev most of the time.  I don't think this fixes the 
problem, it only makes the test less stressful.  Both of these tests find a lot 
of real bugs in redefinition, like this one.

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

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

Reply via email to