> 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 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/31264/files - new: https://git.openjdk.org/jdk/pull/31264/files/77834c9c..26e3a81a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=31264&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=31264&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/31264.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/31264/head:pull/31264 PR: https://git.openjdk.org/jdk/pull/31264
