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

G1ServiceThread may not terminate

XMLWordPrintable

    • gc
    • b07

        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.

              kbarrett Kim Barrett
              kbarrett Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: