This hang is discovered through bug 4528190 (JCK1.4: api/java_rmi/server/RemoteStub/serial/index.html#Input hangs, linux).
VM hangs on all platforms under this scenario:
1) A baby thread is created, its state is INITIALIZED
2) Profiler suspends the thread. We increment its suspend_depth but leave its
state unchanged.
3) Profiler resumes the thread. Because its state was not changed in step 2),
resume_thread_impl thought it's canceling a pending suspend. It will return
failing to actually resume the thread.
VM hangs on all platforms under this scenario:
1) A baby thread is created, its state is INITIALIZED
2) Profiler suspends the thread. We increment its suspend_depth but leave its
state unchanged.
3) Profiler resumes the thread. Because its state was not changed in step 2),
resume_thread_impl thought it's canceling a pending suspend. It will return
failing to actually resume the thread.