Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8217755

SuspendThread might hang expecting lock in JavaThread::is_ext_suspend_completed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 13
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
      None

      Description

      Stress test hangs trying to suspend a thread in
      Thread 74 (Thread 0x2af30b639700 (LWP 22508)):
      #0 0x00002af2ae69a945 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
      #1 0x00002af2afe89a85 in os::PlatformEvent::park (this=0x2af344003800) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/os/posix/os_posix.cpp:1950
      #2 0x00002af2afe079c7 in ParkCommon (ev=0x2af344003800, timo=0) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/mutex.cpp:399
      #3 0x00002af2afe07bda in Monitor::ILock (this=0x2af2b403bde0, Self=0x2af344002000) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/mutex.cpp:461
      #4 0x00002af2afe09087 in Monitor::lock_without_safepoint_check (this=0x2af2b403bde0, Self=0x2af344002000) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/mutex.cpp:932
      #5 0x00002af2afe09123 in Monitor::lock_without_safepoint_check (this=0x2af2b403bde0) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/mutex.cpp:938
      #6 0x00002af2aff65faf in SafepointSynchronize::block (thread=0x2af344002000) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/safepoint.cpp:890
      #7 0x00002af2af418928 in SafepointMechanism::block_if_requested_local_poll (thread=0x2af344002000) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/safepointMechanism.inline.hpp:63
      #8 0x00002af2af418969 in SafepointMechanism::block_if_requested (thread=0x2af344002000) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/safepointMechanism.inline.hpp:73
      #9 0x00002af2af418b84 in ThreadStateTransition::transition_and_fence (thread=0x2af344002000, from=_thread_blocked, to=_thread_in_vm) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/interfaceSupport.inline.hpp:128
      #10 0x00002af2af418bc2 in ThreadStateTransition::trans_and_fence (this=0x2af30b638780, from=_thread_blocked, to=_thread_in_vm) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/interfaceSupport.inline.hpp:166
      #11 0x00002af2af418c5e in ThreadBlockInVM::~ThreadBlockInVM (this=0x2af30b638780, __in_chrg=<optimized out>) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/interfaceSupport.inline.hpp:284
      #12 0x00002af2afe09de1 in Monitor::wait (this=0x2af2b458f9e0, no_safepoint_check=false, timeout=110, as_suspend_equivalent=false) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/mutex.cpp:1097
      #13 0x00002af2b0072b89 in JavaThread::is_ext_suspend_completed (this=0x2af2b458e800, called_by_wait=false, delay=5, bits=0x2af30b63886c) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/thread.cpp:722
      #14 0x00002af2b0077e7b in JavaThread::java_suspend (this=0x2af2b458e800) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/thread.cpp:2389
      #15 0x00002af2afc48fc6 in JvmtiSuspendControl::suspend (java_thread=0x2af2b458e800) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/prims/jvmtiImpl.cpp:863
      #16 0x00002af2afc23c70 in JvmtiEnv::SuspendThread (this=0x2af2b4031170, java_thread=0x2af2b458e800) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/prims/jvmtiEnv.cpp:955
      #17 0x00002af2afbc454b in jvmti_SuspendThread (env=0x2af2b4031178, thread=0x2af35800bc08) at /scratch/lmesnik/ws/ks-jvmti/build/linux-x64/hotspot/variant-server/gensrc/jvmtifiles/jvmtiEnter.cpp:528
      #18 0x00002af2b1885820 in agent_sampler (jvmti=0x2af2b4031178, env=0x2af344002390, p=0x0) at /scratch/lmesnik/ws/ks-jvmti/closed/test/hotspot/jtreg/applications/kitchensink/process/stress/modules/libJvmtiStressModule.c:282
      #19 0x00002af2afc46481 in JvmtiAgentThread::call_start_function (this=0x2af344002000) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/prims/jvmtiImpl.cpp:85
      #20 0x00002af2afc46416 in JvmtiAgentThread::start_function_wrapper (thread=0x2af344002000, __the_thread__=0x2af344002000) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/prims/jvmtiImpl.cpp:79
      #21 0x00002af2b00762e3 in JavaThread::thread_main_inner (this=0x2af344002000) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/thread.cpp:1870
      #22 0x00002af2b007615a in JavaThread::run (this=0x2af344002000) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/thread.cpp:1853
      #23 0x00002af2b007221f in Thread::call_run (this=0x2af344002000) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/share/runtime/thread.cpp:400
      #24 0x00002af2afe72204 in thread_native_entry (thread=0x2af344002000) at /scratch/lmesnik/ws/ks-jvmti/open/src/hotspot/os/linux/os_linux.cpp:712
      #25 0x00002af2ae696e25 in start_thread () from /lib64/libpthread.so.0
      #26 0x00002af2aeba734d in clone () from /lib64/libc.so.6

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sspitsyn Serguei Spitsyn
              Reporter:
              lmesnik Leonid Mesnik
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: