Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8289109 | 19 | Dukebot | P3 | Closed | Won't Fix |
The following guarantee in Handshake::execute has to be adjusted for the case of target thread being current:
void Handshake::execute(HandshakeClosure* hs_cl, ThreadsListHandle* tlh, JavaThread* target) {
. . .
if (tlh == nullptr) {
guarantee(Thread::is_JavaThread_protected_by_TLH(target),
"missing ThreadsListHandle in calling context.");
It has to be similar to the following async Handshake::execute version:
void Handshake::execute(AsyncHandshakeClosure* hs_cl, JavaThread* target) {
jlong start_time_ns = os::javaTimeNanos();
AsyncHandshakeOperation* op = new AsyncHandshakeOperation(hs_cl, target, start_time_ns);
guarantee(target != nullptr, "must be");
Thread* current = Thread::current();
if (current != target) {
// Another thread is handling the request and it must be protecting
// the target.
guarantee(Thread::is_JavaThread_protected_by_TLH(target),
"missing ThreadsListHandle in calling context.");
}
Also, please, refer to the comments from David on the related bugJDK-8286960
void Handshake::execute(HandshakeClosure* hs_cl, ThreadsListHandle* tlh, JavaThread* target) {
. . .
if (tlh == nullptr) {
guarantee(Thread::is_JavaThread_protected_by_TLH(target),
"missing ThreadsListHandle in calling context.");
It has to be similar to the following async Handshake::execute version:
void Handshake::execute(AsyncHandshakeClosure* hs_cl, JavaThread* target) {
jlong start_time_ns = os::javaTimeNanos();
AsyncHandshakeOperation* op = new AsyncHandshakeOperation(hs_cl, target, start_time_ns);
guarantee(target != nullptr, "must be");
Thread* current = Thread::current();
if (current != target) {
// Another thread is handling the request and it must be protecting
// the target.
guarantee(Thread::is_JavaThread_protected_by_TLH(target),
"missing ThreadsListHandle in calling context.");
}
Also, please, refer to the comments from David on the related bug
- backported by
-
JDK-8289109 adjust guarantee in Handshake::execute for the case of target thread being current
-
- Closed
-
- relates to
-
JDK-8286960 Test serviceability/jvmti/vthread/SuspendResume2 crashed: missing ThreadsListHandle in calling context
-
- Resolved
-
-
JDK-8289129 [BACKOUT] JDK-8287281 adjust guarantee in Handshake::execute for the case of target thread being current
-
- Closed
-