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

G1ServiceThread may not terminate

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 17, 18
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b07

      Description

      In G1ServiceThread, there is a race between stop_service and the termination check in sleep_before_next_cycle. The latter checks should_terminate outside the lock, and then enters the monitor and waits for notification or the next task to be ready. If stop is requested after the should_terminate check but before entering the monitor, the stop request will be missed. The should_terminate check should be (re)done after entering the monitor. It will eventually terminate if there are periodic tasks, but only when the next task becomes ready.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kbarrett Kim Barrett
              Reporter:
              kbarrett Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: