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

no forced suspension in JVMPI/JVMDI/JVM_SuspendThread

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.1
    • 1.4.1
    • hotspot
    • None
    • hopper
    • generic
    • generic

      External suspend requests from JVMPI/JVMDI/JVM_Suspend interface marks the
      external_suspend flag for the target thread, then target thread will
      self-suspend some time later if it is not executing native code. Current
      implementation guarantees no new byte code will be executed after the suspend
      function returns.

      However, if target thread is running native code when the suspend function
      is called, it is suspended immediately and non-cooperatively to prevent
      deadlock on raw monitors in JVMPI and JVMDI.

      Non-cooperative suspension is inherently deadlock-prone as target thread may
      be suspended while holding important resources. There have been a number of
      bugs on hangs caused by non-cooperative suspensions. On the other hand, a
      lot of changes have been made since the 1.3 days in the object monitor area to
      make them ready for cooperative suspensions. It is therefore desirable to
      turn off the "native_now" flag in JMVPI/JVMDI/JVM_Suspend calls and let threads
      running native code self-suspend when they are ready to do so. That also helps
      us simplify the suspend/resume logic.

            hhuangsunw Hui Huang (Inactive)
            hhuangsunw Hui Huang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: