On Sat, 23 May 2026 00:16:34 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).

This pull request has now been integrated.

Changeset: 2fa9eb67
Author:    Chris Plummer <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/2fa9eb67648c62c97b7f0368f474d7e56766038e
Stats:     36 lines in 6 files changed: 24 ins; 3 del; 9 mod

8375076: Two JDI scenario tests are failing with out of wait time after 
completing successfully

Reviewed-by: sspitsyn, dholmes

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

PR: https://git.openjdk.org/jdk/pull/31264

Reply via email to