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

Missing termination check results violation of termination invariant

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b06
    • Verification:
      Not verified

      Backports

        Description


        diff --git a/src/hotspot/share/gc/shared/owstTaskTerminator.cpp b/src/hotspot/share/gc/shared/owstTaskTerminator.cpp
        --- a/src/hotspot/share/gc/shared/owstTaskTerminator.cpp
        +++ b/src/hotspot/share/gc/shared/owstTaskTerminator.cpp

        @@ -59,21 +61,31 @@
         
               if (do_spin_master_work(terminator)) {
                 assert(_offered_termination == _n_threads, "termination condition");
        + assert(!peek_in_queue_set(), "Precondition");
                 return true;
               } else {
                 _blocker->lock_without_safepoint_check();
        + // There is possibility that termination is reached between dropping the lock
        + // before returning from do_spin_master() and acquiring lock above.
        + if (_offered_termination == _n_threads) {
        + _blocker->unlock();
        + assert(!peek_in_queue_set(), "Precondition");
        + return true;
        + }

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  zgu Zhengyu Gu
                  Reporter:
                  zgu Zhengyu Gu
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: