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

notifyJvmtiMount before notifyJvmtiUnmount

XMLWordPrintable

    • b21

        Consider a virtual thread mounted on carrier T1 that parks. If unparked at around the time that it may continue on T1 or may continue on a different carrier T2. When it continues on T1, it's possible for the notifyJvmtiMount to race with the notifyJvmtiUnmount on T2. This is examined to see if if notifyJvmtiUnmount should be sent before the virtual thread transitions to the PARKED state. This would mean the JVMTI unmount is done when the virtual thread is in the PARKING state, which should be okay although it risks being trapped in that state for a long time, esp. if the JDK specific JVMTI_EVENT_VIRTUAL_THREAD_UNMOUNT event is enabled and the callback takes a long time.

              alanb Alan Bateman
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: