[jdk19] RFR: 8287847: Fatal Error when suspending virtual thread after it has terminated [v8]
Chris Plummer
cjplummer at openjdk.org
Sat Jul 2 06:21:36 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);
> }
Chris Plummer has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains ten additional commits since the last revision:
- Merge branch 'master' of https://github.com/openjdk/jdk19 into 8287847_nb
merge
- provide a slightly more descriptive @summary
- Add new SuspendAfterDeath test to jdk_jdi_sanity test group.
- Always run test both in virtual and platform thread modes
- No need to initialzie boolean to false.
- Get rid of need to cast toArray() result to a String[]
- fix indentation
- fixed jcheck errors
- Fix issue with suspending a virtual thread after it has terminated.
-------------
Changes:
- all: https://git.openjdk.org/jdk19/pull/88/files
- new: https://git.openjdk.org/jdk19/pull/88/files/bb35374e..17e4658e
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk19&pr=88&range=07
- incr: https://webrevs.openjdk.org/?repo=jdk19&pr=88&range=06-07
Stats: 1123 lines in 39 files changed: 833 ins; 91 del; 199 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