[jdk19] RFR: 8287847: Fatal Error when suspending virtual thread after it has terminated
Chris Plummer
cjplummer at openjdk.org
Tue Jun 28 22:48:16 UTC 2022
This fixes a bug in the debug agent when there is a request to suspend a virtual thread that has already terminated. The issue was that unless the debug agent was currently under a "suspend all", it would not properly put the virtual thread on the `otherThreads` list, and instead added it to `runningVThreads`. This meant at the end of `insertThread()` the following code tried to do a JVMTI `SetThreadLocalStorage`, which can't be done on a terminated thread.
if (list != &otherThreads) {
setThreadLocalStorage(node->thread, (void*)node);
}
-------------
Commit messages:
- fixed jcheck errors
- Fix issue with suspending a virtual thread after it has terminated.
Changes: https://git.openjdk.org/jdk19/pull/88/files
Webrev: https://webrevs.openjdk.org/?repo=jdk19&pr=88&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8287847
Stats: 148 lines in 3 files changed: 147 ins; 1 del; 0 mod
Patch: https://git.openjdk.org/jdk19/pull/88.diff
Fetch: git fetch https://git.openjdk.org/jdk19 pull/88/head:pull/88
PR: https://git.openjdk.org/jdk19/pull/88
More information about the serviceability-dev
mailing list