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

Improve JVMCI support for blocking compilation

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b105

      Description

      As a result of JDK-8141330, the CompileBroker uses a timeout of 1 second when waiting for a blocking JVMCI compilation to complete. This approach is too simple. JVMCI compiler threads themselves flood the compilation queues with compilation requests; such compilations cannot be blocking (the JVMCI compiler executes Java code and so can cause the system to deadlock). This flooding means that application submitted tasks often timeout before the tasks even start compiling.
      Once a JVMCI thread starts compiling a task, there is still the risk of it deadlocking. The current timeout mechanism needs to be augmented with a test of the compiler thread's state. As long as it's not blocked for too long, we know the compiler is making progress and will eventually complete.

      This issue covers the following changes when the VM is in blocking compilation mode:

      1. Blocking tasks are selected before non-blocking tasks from the compilation queue(s).
      2. A thread waiting for a compilation task to complete checks the state of the compiler thread periodically (500ms intervals). If 5 successive checks see a blocked thread, the compilation times out and the waiting thread is unblocked.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dnsimon Douglas Simon
                Reporter:
                dnsimon Douglas Simon
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: