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

vmTestbase/nsk/jvmti/PopFrame/popframe011 fails with "assert(java_thread == _state->get_thread()) failed: Must be"

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 17
    • 18
    • hotspot
    • None
    • b25
    • x86_64
    • linux_ubuntu

    Description

      The following test:

      vmTestbase/nsk/jvmti/PopFrame/popframe011/TestDescription.java

      can fail with:

      # Internal Error (/work/shared/bug_hunt/thread_SMR_stress/jdk17_exp.git/open/src/hotspot/share/prims/jvmtiEnvBase.cpp:1533), pid=15364, tid=4442
      # assert(java_thread == _state->get_thread()) failed: Must be
      #
      # JRE version: Java(TM) SE Runtime Environment (17.0) (fastdebug build 17-internal+0-LTS-2021-04-30-1905344.dcubed...)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 17-internal+0-LTS-2021-04-30-1905344.dcubed..., mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x11dcac8] UpdateForPopTopFrameClosure::doit(Thread*, bool)+0xa8


      Here's a snippet from the log file:

      #section:main
      ----------messages:(4/267)----------
      command: main -agentlib:popframe011 nsk.jvmti.PopFrame.popframe011 6600
      reason: User specified action: run main/othervm/native/timeout=6900 -agentlib:popframe011 nsk.jvmti.PopFrame.popframe011 6600
      Mode: othervm [/othervm specified]
      elapsed time (seconds): 3363.522
      ----------configuration:(0/0)----------
      ----------System.out:(22/1610)----------
      About to execute for 6600 seconds.
      # To suppress the following error report, specify this argument
      # after -XX: or in .hotspotrc: SuppressErrorAt=/jvmtiEnvBase.cpp:1533
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/work/shared/bug_hunt/thread_SMR_stress/jdk17_exp.git/open/src/hotspot/share/prims/jvmtiEnvBase.cpp:1533), pid=15364, tid=4442
      # assert(java_thread == _state->get_thread()) failed: Must be
      #
      # JRE version: Java(TM) SE Runtime Environment (17.0) (fastdebug build 17-internal+0-LTS-2021-04-30-1905344.dcubed...)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 17-internal+0-LTS-2021-04-30-1905344.dcubed..., mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x11dcac8] UpdateForPopTopFrameClosure::doit(Thread*, bool)+0xa8
      #
      # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /work/shared/bug_hunt/thread_SMR_stress/jdk17_exp.git/build/linux-x86_64-normal-server-fastdebug/test-support/jtreg_open_test_hotspot_jtreg_StressWrapper_popframe011_java/StressWrapper_popframe011/core.15364)
      #
      # An error report file with more information is saved as:
      # /work/shared/bug_hunt/thread_SMR_stress/jdk17_exp.git/build/linux-x86_64-normal-server-fastdebug/test-support/jtreg_open_test_hotspot_jtreg_StressWrapper_popframe011_java/StressWrapper_popframe011/hs_err_pid15364.log
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #
      ----------System.err:(0/0)----------
      ----------rerun:(33/5020)*----------

      Here's the crashing thread's stack:

      --------------- T H R E A D ---------------

      Current thread (0x00002aca5c0308f0): JavaThread "Thread-9532887" [_thread_in_vm, id=4442, stack(0x00002acaa4606000,0x00002acaa4707000)]

      Stack: [0x00002acaa4606000,0x00002acaa4707000], sp=0x00002acaa4704630, free space=1017k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x11dcac8] UpdateForPopTopFrameClosure::doit(Thread*, bool)+0xa8
      V [libjvm.so+0xd8ddf0] HandshakeOperation::do_handshake(JavaThread*)+0xf0
      V [libjvm.so+0xd8df81] HandshakeState::process_self_inner()+0x141
      V [libjvm.so+0xd8e2cd] HandshakeState::process_by_self()+0x19d
      V [libjvm.so+0x16ff118] SafepointMechanism::process_if_requested_slow(JavaThread*)+0x28
      V [libjvm.so+0x14f6c18] Mutex::lock_contended(Thread*)+0x548
      V [libjvm.so+0x14f6de4] Mutex::lock(Thread*)+0xf4
      V [libjvm.so+0x18ba1c8] Threads::remove(JavaThread*, bool)+0x38
      V [libjvm.so+0x18bd08e] JavaThread::exit(bool, JavaThread::ExitType)+0x89e
      V [libjvm.so+0x18bd5b9] JavaThread::post_run()+0x19
      V [libjvm.so+0x18bc65d] Thread::call_run()+0x16d
      V [libjvm.so+0x159387e] thread_native_entry(Thread*)+0x10e

      Please note this this failure is happening with the latest version
      of the popframe011 test that I'm developing via:

          JDK-8266130 Convert Thread-SMR stress tests from counter based to time based

      My updates in JDK-8266130 only change the duration of the
      test execution and don't change the popframe logic at all, i.e.,
      run the same test more times and it will eventually crash.

      Attachments

        Issue Links

          Activity

            People

              sspitsyn Serguei Spitsyn
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: