Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-5103

[drlvm] Crash in DeleteGlobalRef

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • DRLVM
    • None
    • x86-64

    Description

      During evaluating HARMONY-2772 crash on following stack was reproduced:

      SIGSEGV in VM code.
      Stack trace:
      0: JNIEnv_External::DeleteGlobalRef(_jobject*) (/nfs/ims/proj/drl/mrt2/users/pnafremo/work/H64/drlvm/vm/include/jni.h:678)
      1: jthread_vm_detach (/nfs/ims/proj/drl/mrt2/users/pnafremo/work/H64/drlvm/vm/vmcore/src/thread/thread_java_basic.cpp:419)
      2: jthread_wrapper_start_proc(void*) (/nfs/ims/proj/drl/mrt2/users/pnafremo/work/H64/drlvm/vm/vmcore/src/thread/thread_java_basic.cpp:172)
      3: start_thread (??:-1)
      <end of stack trace>
      Segmentation fault

      As evaluation shows the source of the crash is in jni_env usage after deallocation in vm_detach.
      If jni_env, after deallocation but before usage, is nullified in other thread, sigsegv happen.

      Attachments

        1. HARMONY-5103.patch
          0.8 kB
          Pavel Afremov

        Issue Links

          Activity

            People

              gshimansky Gregory Shimansky
              pavel.n.afremov Pavel Afremov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: