What are the status of the Dalvik stream?

Each ANR dump lists the states of all threads during ANR. I know what WAIT means, but what do SUSPENDED and MONITOR mean?

Thanks in advance...

+7
android dalvik android-anr-dialog
source share
1 answer

Dalvik Stream Status Summary:

  • INITIALIZATION - not yet started.
  • STARTING - still not working, but almost there.
  • ZOMBIE - dead (you shouldn't see this).
  • RUNNING (a / k / a RUNNABLE) - the thread is actively working. The VM must pause all threads to dump the stack, so you usually won't see this for any thread other than the one that flushes the stack.
  • WAIT is a thread called wait () and waits patiently.
  • TIMED_WAIT - A thread called wait () with a timeout. (Thread.sleep () is implemented as the expected timeout.)
  • MONITOR - the stream is blocked when the monitor is blocked, i.e. he is stuck trying to enter a "synchronized" block.
  • NATIVE - the thread runs in its own code. The VM does not suspend threads in its own code unless they make a JNI call (after which they go to RUNNING, and then immediately to SUSPENDED).
  • VMWAIT — The thread is blocked to receive a VM resource, such as an internal mutex. Or maybe waiting for something (e.g. compiler and GC threads).
  • SUSPENDED - the stream was started, but was suspended. As noted earlier, the stacker likes to pause all threads before crossing their stacks, so your busy threads will usually be displayed this way. (In older versions of this state was not, "suspended" was used as "RUNNING with non-zero sCount".)
+34
source share

All Articles