> Allow OpaqueFrameException for vthreads when suspended in a loop (not at an > event). This became necessary after > [JDK-8386116](https://bugs.openjdk.org/browse/JDK-8386116). The > ThreadReference.stop() spec allows for this: > > `This method may be used to send an asynchronous exception to a virtual > thread when it is suspended at an event. An implementation may support > sending an asynchronous exception to a suspended virtual thread in other > cases.` > > and > > `OpaqueFrameException - if the thread is a suspended virtual thread and the > implementation was unable to throw an asynchronous exception from the > thread's current frame` > > I also field [JDK-8390483](https://bugs.openjdk.org/browse/JDK-8390483) to > investigate if JVMTI should remove all vthread support for StopThread when > not at an event rather than having work just some of the time. > > The failure used to happen about 1 out of 50 runs. Tested with both platform > threads and with virtual threads about 200 times each with no issues. > > --------- > - [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: verify we got OpaqueFrameException when no exception thrown on debuggee side ------------- Changes: - all: https://git.openjdk.org/jdk/pull/32403/files - new: https://git.openjdk.org/jdk/pull/32403/files/6f73bc8e..23c0499a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=32403&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=32403&range=00-01 Stats: 20 lines in 2 files changed: 17 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/32403.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/32403/head:pull/32403 PR: https://git.openjdk.org/jdk/pull/32403
