On Tue, 26 May 2026 16:39:30 GMT, Chris Plummer <[email protected]> wrote:

>> The issue is a large number of method calls and exits that are done in 
>> library initialization code while the test has enabled MethodExit and/or 
>> MethodEntry events. These events are being be generated during the debuggee 
>> System.exit() call, sometimes resulting in the test timing out during exit.
>> 
>> There are 3 tests that appear to have timedout as a result of this at some 
>> point, and I found 1 other that is at risk.
>> 
>>      vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x004/TestDescription.java. 
>> <--- hasn't failed yet
>>      vmTestbase/nsk/jdi/BScenarios/multithrd/tc04x001/TestDescription.java
>>      
>> vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes003/TestDescription.java
>>      
>> vmTestbase/nsk/jdi/Scenarios/invokeMethod/popframes001/TestDescription.java
>> 
>> The timeouts only happens on Windows hosts where the API to get a timestamp 
>> is slow. The delivery of a JVMTI MethodEntry or Exit events to the debug 
>> agent results in this timestamp API being called. The fix is to modify the 
>> tests to reduce the number of JVMTI events, either by disabling the events 
>> before doing the System.exit() or triggering the loading and initialization 
>> of the classes early before the events are enabled. The latter is chosen 
>> when it is difficult to find a good time to disable the events.
>> 
>> Note that these MethodEntry/Exits events for the most part are all filtered 
>> out by the debug agent because the test only wants them from certain test 
>> classes. Valhalla made the issue worse by triggering more class loading and 
>> initialization while the events are enabled, and the changes in valhalla 
>> responsible for this have since been integrated into mainline with 
>> [JDK-8377070](https://bugs.openjdk.org/browse/JDK-8377070), causing at least 
>> the popframes001 failure to start appearing there also.
>> 
>> Tested by running all the tests 100s of times on Windows, and also tested 
>> these changes in the valhalla repo.
>> Also ran all svc tier1, tier2, and tier5 tests.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Chris Plummer has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   fix typo in comment

Ping! I could use one more review. TIA!

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

PR Comment: https://git.openjdk.org/jdk/pull/31264#issuecomment-4559297061

Reply via email to