RFR: 8266130: convert Thread-SMR stress tests from counter based to time based [v2]

Chris Plummer cjplummer at openjdk.java.net
Mon Jun 7 22:13:18 UTC 2021


On Tue, 1 Jun 2021 20:52:40 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> The Thread-SMR project added counter based tests for various APIs.
>> See "JDK-8167108 inconsistent handling of SR_lock can lead to crashes".
>> 
>> Time based tests are more appropriate for stress kits so I'm
>> updating the counter based tests to be time based instead.
>> 
>> Two of the updated tests have shaken out failures that are tracked by:
>> 
>>     JDK-8264605 vmTestbase/nsk/jvmti/SuspendThread/suspendthrd003/TestDescription.java failed with "agent_tools.cpp, 471: (foundThread = (jthread) jni_env->NewGlobalRef(foundThread)) != NULL"
>> 
>>     JDK-8266593 vmTestbase/nsk/jvmti/PopFrame/popframe011 fails with "assert(java_thread == _state->get_thread()) failed: Must be"
>> 
>> These updated tests are tested via Mach5 Tier[134567].
>> They have also been test by my Stress Kit runs for jdk-17+2[0-5].
>
> Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Apply @plummercj code review fix from JDK-8265153 to this review also.

test/hotspot/jtreg/runtime/Thread/InterruptAtExit.java line 82:

> 80:                 thread.exitSyncObj.countDown();
> 81:                 while (true) {
> 82:                     thread.interrupt();

I just want to make sure I correctly understand the intent here. You call countDown() to unblock the thread's run() method, and then immediately interrupt the thread to create a race between the thread doing a normal exit and the thread being interrupted before or as it exits.

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

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


More information about the serviceability-dev mailing list