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

ThreadsList handling during error reporting can crash

    Details

    • Subcomponent:
    • Resolved In Build:
      master

      Description

      Looking at the crash in JDK-8218483 we are failing an assertion here:

      Stack: [0x00007fd5a8078000,0x00007fd5a8179000], sp=0x00007fd5a8177ae0, free space=1022k
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x17ca632] ThreadService::remove_thread(JavaThread*, bool)+0x482
      V [libjvm.so+0x17b68d3] Threads::remove(JavaThread*)+0xf3
      V [libjvm.so+0x17be128] JavaThread::exit(bool, JavaThread::ExitType)+0x7d8
      V [libjvm.so+0x17be6a9] JavaThread::thread_main_inner()+0x149
      V [libjvm.so+0x17beafc] JavaThread::run()+0x1cc
      V [libjvm.so+0x17ba715] Thread::call_run()+0x75
      V [libjvm.so+0x14a41e6] thread_native_entry(Thread*)+0x106

      So the current thread is exiting. In the hs-err log we then see:

      Register to memory mapping:

      RAX=
      [error occurred during error reporting (printing register info), id 0xe0000000, Internal Error (/scratch/opt/mach5/mesos/work_dir/slaves/07fc96ef-bf4d-487f-b22f-a84e49f5f44a-S39745/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/d1f9695d-395c-429c-b388-d418cbb0ddd4/runs/3528f97a-cfa7-424f-a107-519d8e435039/workspace/open/src/hotspot/share/runtime/threadSMR.cpp:557)]

      ...

      Stack slot to memory mapping:
      stack at sp + 0 slots:
      [error occurred during error reporting (inspecting top of stack), id 0xe0000000, Internal Error (/scratch/opt/mach5/mesos/work_dir/slaves/07fc96ef-bf4d-487f-b22f-a84e49f5f44a-S39745/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/d1f9695d-395c-429c-b388-d418cbb0ddd4/runs/3528f97a-cfa7-424f-a107-519d8e435039/workspace/open/src/hotspot/share/runtime/threadSMR.cpp:557)]

      which are failing this assert:

       // If the calling thread is not honoring the Thread-SMR protocol,
        // then we will either crash in threads_do() above because 'threads'
        // was freed by another thread or we will fail the assert() below.
        // In either case, we won't get past this point with a badly placed
        // ThreadsListHandle.

        assert(cl.found() || _thread == VM_Exit::shutdown_thread(), "Acquired a ThreadsList snapshot from a thread not recognized by the Thread-SMR protocol.");

      Presumably because this thread is already well into the exit process it should not be partaking in the SMR protocol.

        Attachments

          Activity

            People

            • Assignee:
              rehn Robbin Ehn
              Reporter:
              dholmes David Holmes
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: