summaryrefslogtreecommitdiff
path: root/runtime/native/java_lang_Thread.cc
diff options
context:
space:
mode:
authorKoji Fukui <koji.fukui@sony.com>2019-03-05 12:22:57 +0900
committerMathieu Chartier <mathieuc@google.com>2019-03-18 17:19:04 +0000
commit97b964960123d5f215a1cebbce548c8a5322c307 (patch)
tree04239f8bc25ce6f22bda774bbae37755ed8acb27 /runtime/native/java_lang_Thread.cc
parent26a5dd6fd1d65de29ba85e4bb61d9267dd428238 (diff)
Change state to waiting during aborting the VM
Symptom: Process freeze when multiple runtime error happen on runnable threads. Root cause: When multiple runtime error happen, only one thread locks abort_lock_ and other threads are blocked even if they are runnable state. If an other thread tries to suspend blocked threads at the same time, blocked threads can't be suspended until abort_lock_ is unlocked from owner thread. But owner thread can be suspended even if it locks abort_lock_. Thus, these threads causes dead lock. Solution: Change state to waiting when locking abort_lock_. Bug: 127875380 Change-Id: I7e914924690bb30d6d0490cf5f8afdb1c3cd4e4a
Diffstat (limited to 'runtime/native/java_lang_Thread.cc')
-rw-r--r--runtime/native/java_lang_Thread.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/native/java_lang_Thread.cc b/runtime/native/java_lang_Thread.cc
index 67ad0a47b8..37b3fe642e 100644
--- a/runtime/native/java_lang_Thread.cc
+++ b/runtime/native/java_lang_Thread.cc
@@ -104,6 +104,7 @@ static jint Thread_nativeGetStatus(JNIEnv* env, jobject java_thread, jboolean ha
case kWaitingForVisitObjects: return kJavaWaiting;
case kWaitingWeakGcRootRead: return kJavaRunnable;
case kWaitingForGcThreadFlip: return kJavaWaiting;
+ case kNativeForAbort: return kJavaWaiting;
case kSuspended: return kJavaRunnable;
// Don't add a 'default' here so the compiler can spot incompatible enum changes.
}