RFR: 8355453: nsk.share.jdi.Debugee.waitingEvent() does not timeout properly
Chris Plummer
cjplummer at openjdk.org
Thu Apr 24 05:33:22 UTC 2025
nsk.share.jdi.Debugee.waitingEvent() takes a timeout argument. However, if the call to EventQueue.remove() times out and returns null, waitingEvent() just keep on retrying. The logic is incorrect for a null result. It should immediately throw an exception. The retry path is only meant for filtering out other events, and it updates "timeLeft' before retrying to avoid endlessly repeating the loop.
Tested by running all of nsk/jdi locally on linux-x64-debug
-------------
Commit messages:
- Throw exception when EventQueue.remove() times out
Changes: https://git.openjdk.org/jdk/pull/24839/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24839&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8355453
Stats: 4 lines in 1 file changed: 0 ins; 1 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/24839.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24839/head:pull/24839
PR: https://git.openjdk.org/jdk/pull/24839
More information about the serviceability-dev
mailing list